+static const char *testlvl =
+ "########\n"
+ "### s#\n"
+ "### ####\n"
+ "### #\n"
+ "## #\n"
+ "## #\n"
+ "## #\n"
+ "## ### #\n"
+ "## ### #\n"
+ "## #\n"
+ "#### ###\n"
+ "########\n";
+
+static struct xvertex cube[] __attribute__((section(".rodata"))) = {
+ /* front */
+ {-0x10000, -0x10000, -0x10000, 0, 0, -0x10000, 255},
+ {0x10000, -0x10000, -0x10000, 0, 0, -0x10000, 255},
+ {0x10000, 0x10000, -0x10000, 0, 0, -0x10000, 255},
+ {-0x10000, 0x10000, -0x10000, 0, 0, -0x10000, 255},
+ /* right */
+ {0x10000, -0x10000, -0x10000, 0x10000, 0, 0, 128},
+ {0x10000, -0x10000, 0x10000, 0x10000, 0, 0, 128},
+ {0x10000, 0x10000, 0x10000, 0x10000, 0, 0, 128},
+ {0x10000, 0x10000, -0x10000, 0x10000, 0, 0, 128},
+ /* back */
+ {0x10000, -0x10000, 0x10000, 0, 0, 0x10000, 200},
+ {-0x10000, -0x10000, 0x10000, 0, 0, 0x10000, 200},
+ {-0x10000, 0x10000, 0x10000, 0, 0, 0x10000, 200},
+ {0x10000, 0x10000, 0x10000, 0, 0, 0x10000, 200},
+ /* left */
+ {-0x10000, -0x10000, 0x10000, -0x10000, 0, 0, 192},
+ {-0x10000, -0x10000, -0x10000, -0x10000, 0, 0, 192},
+ {-0x10000, 0x10000, -0x10000, -0x10000, 0, 0, 192},
+ {-0x10000, 0x10000, 0x10000, -0x10000, 0, 0, 192},
+ /* top */
+ {-0x10000, 0x10000, -0x10000, 0, 0x10000, 0, 150},
+ {0x10000, 0x10000, -0x10000, 0, 0x10000, 0, 150},
+ {0x10000, 0x10000, 0x10000, 0, 0x10000, 0, 150},
+ {-0x10000, 0x10000, 0x10000, 0, 0x10000, 0, 150},
+ /* bottom */
+ {0x10000, -0x10000, -0x10000, 0, -0x10000, 0, 210},
+ {-0x10000, -0x10000, -0x10000, 0, -0x10000, 0, 210},
+ {-0x10000, -0x10000, 0x10000, 0, -0x10000, 0, 210},
+ {0x10000, -0x10000, 0x10000, 0, -0x10000, 0, 210}
+};
+
+
+static struct level *lvl;
+
+static int32_t cam_theta, cam_phi;