From: sparky4 Date: Thu, 16 Jun 2016 16:50:58 +0000 (-0500) Subject: optimize for XT i did ww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=eae4d66409e20e893ac6c407a908c08daafaf098;p=16.git optimize for XT i did ww --- diff --git a/src/lib/16_timer.c b/src/lib/16_timer.c index 6d00448f..e45ee948 100755 --- a/src/lib/16_timer.c +++ b/src/lib/16_timer.c @@ -28,16 +28,18 @@ clock_t start_timer(global_game_variables_t *gv) gv->kurokku.tiku = 0; gv->kurokku.clock_start = *clockw; gv->kurokku.clock = clockw; - gv->kurokku.frames_per_second = 60; + //gv->kurokku.frames_per_second = 60; gv->pee = _nmalloc(sizeof(byte)*16); //turn this off if XT switch(detectcpu()) { case 0: gv->kurokku.fpscap=0; + gv->kurokku.frames_per_second=1; break; default: gv->kurokku.fpscap=1; + gv->kurokku.frames_per_second=60; break; } return gv->kurokku.t; @@ -79,17 +81,17 @@ void shinkutxt(global_game_variables_t *gv) gv->kurokku.tiku=0; } gv->kurokku.tiku++; - switch(gv->kurokku.fpscap) - { - case 0: - gv->kurokku.frames_per_second=1; - break; - case 1: - //turn this off if XT - WaitPee(); - gv->kurokku.frames_per_second=60; - break; - } +// switch(gv->kurokku.fpscap) +// { +// case 0: +// gv->kurokku.frames_per_second=1; +// break; +// case 1: +// //turn this off if XT +// WaitPee(); +// gv->kurokku.frames_per_second=60; +// break; +// } } void WaitPee() diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 711d4bc0..c36c5f3f 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -802,6 +802,19 @@ void shinku(global_game_variables_t *gv) }else //copy dat sheet gv->kurokku.tiku++; + switch(gv->kurokku.fpscap) + { + case 0: + modexprint(&(gv->video.page[shinku_fps_indicator_page]), x, y+8, type, col, bgcol, "sanic!"); + gv->kurokku.frames_per_second=1; + break; + case 1: + //turn this off if XT + //modexWaitBorder(); + vga_wait_for_vsync(); + gv->kurokku.frames_per_second=60; + break; + } if(pageflipflop){ if(gv->video.r){ /* block copy pattern to where we will draw the sprite */ diff --git a/src/scroll.c b/src/scroll.c index 18c53111..fa6df24b 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -96,9 +96,9 @@ void main(int argc, char *argv[]) pan.pn=1; //player[0].data = &pp; - printf("starting timer "); + //printf("starting timer "); start_timer(&gvar); - printf("ok\n"); + //printf("ok\n"); // atexit(qclean()); @@ -291,13 +291,9 @@ void main(int argc, char *argv[]) switch(gvar.kurokku.fpscap) { case 0: - //modexprint(&(gv->video.page[shinku_fps_indicator_page]), x, y+8, type, col, bgcol, "sanic!"); gvar.kurokku.frames_per_second=1; break; case 1: - //turn this off if XT - //modexWaitBorder(); - vga_wait_for_vsync(); gvar.kurokku.frames_per_second=60; break; }