X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=vrtris;a=blobdiff_plain;f=src%2Fgamescr.c;h=fde286d3995095147466f7ac58e88aa468680efd;hp=d2e021937f00912792e989e92c082678b740c716;hb=ce8a093ece30d3ab608a52b0247ad7a195cc0cc8;hpb=325391b617a3f5a1f17e03598baa66d00715422d diff --git a/src/gamescr.c b/src/gamescr.c index d2e0219..fde286d 100644 --- a/src/gamescr.c +++ b/src/gamescr.c @@ -302,7 +302,9 @@ static void update(float dtsec) static void draw(void) { - const float lpos[] = {-1, 1, 6, 1}; + static const int nextblk_pos[] = {0, 0}; + static const float lpos[] = {-1, 1, 6, 1}; + float t; glTranslatef(0, 0, -cam_dist); glRotatef(cam_phi, 1, 0, 0); @@ -328,8 +330,15 @@ static void draw(void) if(cur_block >= 0) { draw_block(cur_block, pos, cur_rot); } - glPopMatrix(); + + t = (float)time_msec / 1000.0f; + glTranslatef(-PF_COLS / 2 + 0.5 + PF_COLS + 3, PF_ROWS / 2 - 0.5, 0); + glTranslatef(1.5, -1, 0); + glRotatef(cos(t) * 8.0f, 1, 0, 0); + glRotatef(sin(t * 1.2f) * 10.0f, 0, 1, 0); + glTranslatef(-1.5, 1, 0); + draw_block(next_block, nextblk_pos, 0); } static const float blkspec[] = {0.85, 0.85, 0.85, 1};