X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fgamescr.c;h=96620f3d1ac1d1897107c9dba777c2fa54c633ad;hb=097d03fa2406fca819b27b698ffb1cfc8ac445c2;hp=6449914eca4b15f6526c042b330d22e2d699a86b;hpb=21d9c58231cf7e1bdd95574e579c9c99a4cd1e9c;p=gbajam22 diff --git a/src/gamescr.c b/src/gamescr.c index 6449914..96620f3 100644 --- a/src/gamescr.c +++ b/src/gamescr.c @@ -21,18 +21,26 @@ static int nframes, num_vbl, backbuf; static uint16_t *vram[] = { (uint16_t*)VRAM_LFB_FB0_ADDR, (uint16_t*)VRAM_LFB_FB1_ADDR }; static const char *testlvl = - "########\n" - "### s#\n" - "### ####\n" - "### #\n" - "## #\n" - "## #\n" - "## #\n" - "## ### #\n" - "## ### #\n" - "## #\n" - "#### ###\n" - "########\n"; + "################\n" + "################\n" + "################\n" + "################\n" + "################\n" + "####### s#####\n" + "####### ########\n" + "####### #####\n" + "###### #####\n" + "###### #####\n" + "###### #####\n" + "###### ### #####\n" + "###### ### #####\n" + "###### #####\n" + "######## #######\n" + "################\n" + "################\n" + "################\n" + "################\n" + "################\n"; static struct xvertex tm_floor[] __attribute__((section(".rodata"))) = { {0x10000, -0x10000, 0x10000, 0, 0x10000, 0, 210}, @@ -61,7 +69,7 @@ void gamescr(void) xgl_init(); - memset(&player, 0, sizeof player); + init_player(&player, lvl); player.phi = 0x100; cmap = (uint16_t*)CRAM_BG_ADDR; @@ -113,7 +121,7 @@ static void draw(void) struct cell *cell; xgl_load_identity(); - xgl_translate(0, 0, 0x100000); + /*xgl_translate(0, 0, 0x100000);*/ xgl_rotate_x(player.phi); xgl_rotate_y(player.theta); xgl_translate(player.x, 0, player.y);