X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_timer.c;h=ee508a0a620d1271937eb40f95def66190c56ed3;hb=04fe364b1c5b4fdddca823044c2d584531691af6;hp=e05232a0411fc322c3d4539030a48abb94cbac2b;hpb=e1e1e6b60d5b1808fc4ac80784118287a0437f2d;p=16.git diff --git a/src/lib/16_timer.c b/src/lib/16_timer.c index e05232a0..ee508a0a 100755 --- a/src/lib/16_timer.c +++ b/src/lib/16_timer.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2021 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -27,13 +27,13 @@ static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ clock_t start_timer(global_game_variables_t *gv) { gv->kurokku.t = clock(); - gv->kurokku.tiku = 0; + gv->kurokku.tiku = 0; gv->video.sfip = 0; gv->kurokku.clock_start = *clockw; - gv->kurokku.clock = clockw; - //gv->kurokku.frames_per_second = 60; + gv->kurokku.clock = (word *)clockw; + gv->kurokku.wcpu = WCPU_detectcpu(); - //turn this off if XT - switch(WCPU_detectcpu()) + //turn this off if XT + switch(gv->kurokku.wcpu) { case 0: gv->kurokku.fpscap=0; @@ -41,7 +41,7 @@ clock_t start_timer(global_game_variables_t *gv) break; default: gv->kurokku.fpscap=1; - gv->kurokku.frames_per_second=60; + gv->kurokku.frames_per_second=FPSVALUE; break; } return gv->kurokku.t; @@ -65,14 +65,12 @@ double time_in_seconds(global_game_variables_t *gv) return (gv->kurokku.t) / CLOCKS_PER_SEC; } -// big global status text buffer -char global_temp_status_text[512]; - /*double time_in_seconds(time_t in_t) { return (in_t) / CLOCKS_PER_SEC; }*/ +#if 0 /* sync */ void shinkutxt(global_game_variables_t *gv) { @@ -99,6 +97,7 @@ void shinkutxt(global_game_variables_t *gv) // } } +//#if 0 void WaitPee() { while(inp(INPUT_STATUS_1) & 8) { @@ -109,3 +108,4 @@ void WaitPee() /* spin */ } } +#endif