From 7473a2ca27ea7bd740f5a0d271d89c6fdca68a49 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Tue, 14 Feb 2017 17:44:44 -0600 Subject: [PATCH] ==== FIXED MAP INDEX NUMBER PRITING IN DRAWTILE wwww ==== oh i forgot to add thiswwww --- kurokku.wcpu | 61 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib/16_tdef.h | 1 + src/lib/16_timer.c | 6 ++--- src/lib/scroll16.c | 17 +++++++------ src/zcroll.c | 1 + 5 files changed, 76 insertions(+), 10 deletions(-) create mode 100755 kurokku.wcpu diff --git a/kurokku.wcpu b/kurokku.wcpu new file mode 100755 index 00000000..c2cfbc0c --- /dev/null +++ b/kurokku.wcpu @@ -0,0 +1,61 @@ +src/lib/16_timer.c: gv->kurokku.t = clock(); +src/lib/16_timer.c: gv->kurokku.tiku = 0; gv->video.sfip = 0; +src/lib/16_timer.c: gv->kurokku.clock_start = *clockw; +src/lib/16_timer.c: gv->kurokku.clock = clockw; +src/lib/16_timer.c: gv->kurokku.wcpu = WCPU_detectcpu(); +src/lib/16_timer.c: switch(gv->kurokku.wcpu) +src/lib/16_timer.c: gv->kurokku.fpscap=0; +src/lib/16_timer.c: gv->kurokku.frames_per_second=1; +src/lib/16_timer.c: gv->kurokku.fpscap=1; +src/lib/16_timer.c: gv->kurokku.frames_per_second=60; +src/lib/16_timer.c: return gv->kurokku.t; +src/lib/16_timer.c: return (clock() - gv->kurokku.t) / CLOCKS_PER_SEC; +src/lib/16_timer.c: clocku = (clock() - gv->kurokku.t) / CLOCKS_PER_SEC; +src/lib/16_timer.c: gv->kurokku.t = clock(); +src/lib/16_timer.c: return (gv->kurokku.t) / CLOCKS_PER_SEC; +src/lib/16_timer.c: if(elapsed_timer(gv) >= (1.0 / gv->kurokku.frames_per_second)) +src/lib/16_timer.c: //t=(((*(gv->clock))-gv->clock_start) /18.2); +src/lib/16_timer.c: sprintf(global_temp_status_text, "%.0f fps", (double)gv->kurokku.tiku/ticktock(gv)); +src/lib/16_timer.c: //(gv->clock_start)=*(gv->clock); +src/lib/16_timer.c: gv->kurokku.tiku=0; +src/lib/16_timer.c: gv->kurokku.tiku++; +src/lib/16_timer.c:// switch(gv->kurokku.fpscap) +src/lib/16_timer.c:// gv->kurokku.frames_per_second=1; +src/lib/16_timer.c:// gv->kurokku.frames_per_second=60; +src/lib/16_vl.c: in.h.al = gv->video.old_mode; +src/lib/16_vl.c: gv->video.old_mode = vgaGetMode();//out.h.al; +src/lib/16_vl.c: gv->video.page[0].sw = vga_state.vga_width = 320; // VGA lib currently does not update this +src/lib/16_vl.c: gv->video.page[0].sh = vga_state.vga_height = 240; // VGA lib currently does not update this +src/lib/16_vl.c: gv->video.page[0].height = gv->video.page[0].sh; +src/lib/16_vl.c: gv->video.page[0].width = gv->video.page[0].sw; +src/lib/scroll16.c: pip[0].page = &gv->video.page[0]; +src/lib/scroll16.c: pip[0].video = &gv->video; +src/lib/scroll16.c: pip[0].p = &gv->video.p; +src/lib/scroll16.c: pip[0].sp = &gv->video.sp; +src/lib/scroll16.c: for(i=ZC_MVI;ivideo.num_of_pages;i++) +src/lib/scroll16.c: pip[i].page = &gv->video.page[i]; +src/lib/scroll16.c: word x = gv->video.page[/*!*/(gv->video.p)].dx; //(gv->video.page[(gv->video.p)].tlx) - // follow the screen +src/lib/scroll16.c: word y = gv->video.page[/*!*/(gv->video.p)].dy; //(gv->video.page[(gv->video.p)].tly) - // follow the screen +src/lib/scroll16.c: if(elapsed_timer(gv) >= (1.0 / gv->kurokku.frames_per_second)) +src/lib/scroll16.c: // NTS: For some bizarre reason, gv->pee is not initialized, but the pointer is not NULL even +src/lib/scroll16.c: sprintf(global_temp_status_text, "%.0f fps", (double)gv->kurokku.tiku/ticktock(gv)); +src/lib/scroll16.c: //modexprint(&(gv->video.page[/*!*/(gv->video.p)]), x, y, type, 1, col, bgcol, global_temp_status_text); +src/lib/scroll16.c: if(gv->kurokku.wcpu) +src/lib/scroll16.c: modexCopyPageRegion(&gv->video.page[0], &gv->video.page[1], +src/lib/scroll16.c: gv->video.page[/*!*/(gv->video.p)].dx, +src/lib/scroll16.c: gv->video.page[/*!*/(gv->video.p)].dy, +src/lib/scroll16.c: gv->video.page[/*!*/(gv->video.p)].dx, +src/lib/scroll16.c: gv->video.page[/*!*/(gv->video.p)].dy, +src/lib/scroll16.c: modexprint(&(gv->video.page[/*!*/(gv->video.p)]), x, y, type, 1, col, bgcol, global_temp_status_text); +src/lib/scroll16.c://0000printf("dx=%u dy=%u\n", gv->video.page[/*!*/(gv->video.p)].dx, gv->video.page[/*!*/(gv->video.p)].dy); +src/lib/scroll16.c: gv->kurokku.tiku=0; +src/lib/scroll16.c: gv->kurokku.tiku++; +src/lib/scroll16.c: switch(gv->kurokku.fpscap) +src/lib/scroll16.c: //modexprint(&(gv->video.page[0]), x, y+8, type, 1, col, bgcol, "sanic!"); +src/lib/scroll16.c: gv->kurokku.frames_per_second=1; +src/lib/scroll16.c: gv->kurokku.frames_per_second=60; +src/lib/scroll16.c: if(gv->video.dorender ) +src/lib/scroll16.c: modexCopyPageRegion(&(gv->video.page[ ]), &(gv->video.page[ ]), 0, 0, 0, 0, gv->video.page[ ].width, gv->video.page[ ].height); +src/lib/scroll16.c: VL_ShowPage(&(gv->video.page[gv->video.sp]), gv->kurokku.fpscap, 0); +src/lib/scroll16.c: gv->video.dorender =!gv->video.dorender ; +src/lib/scroll16.c: //0000gv->video.tickclk = ((*clockw)-gv->video.startclk)/18.2; diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index 4c338111..e99be1de 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -274,6 +274,7 @@ typedef struct word clock_start; //timer start word *clock; //current time on clock boolean fpscap; //cap the fps var + nibble wcpu; //stored value of cpu type } kurokku_t; //video diff --git a/src/lib/16_timer.c b/src/lib/16_timer.c index 16295d1b..a9dba5d5 100755 --- a/src/lib/16_timer.c +++ b/src/lib/16_timer.c @@ -30,10 +30,10 @@ clock_t start_timer(global_game_variables_t *gv) 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.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; diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 5c732737..47ee9f7f 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -675,14 +675,17 @@ void shinku(global_game_variables_t *gv) // This fixes *** Null pointer assignment detected error message in ZCROLL.EXE on exit. sprintf(global_temp_status_text, "%.0f fps", (double)gv->kurokku.tiku/ticktock(gv)); //modexprint(&(gv->video.page[/*!*/(gv->video.p)]), x, y, type, 1, col, bgcol, global_temp_status_text); - modexCopyPageRegion(&gv->video.page[0], &gv->video.page[1], - gv->video.page[/*!*/(gv->video.p)].dx, - gv->video.page[/*!*/(gv->video.p)].dy, - gv->video.page[/*!*/(gv->video.p)].dx, - gv->video.page[/*!*/(gv->video.p)].dy, - 96, 16); - modexprint(&(gv->video.page[/*!*/(gv->video.p)]), x, y, type, 1, col, bgcol, global_temp_status_text); + if(gv->kurokku.wcpu) + { + modexCopyPageRegion(&gv->video.page[0], &gv->video.page[1], + gv->video.page[/*!*/(gv->video.p)].dx, + gv->video.page[/*!*/(gv->video.p)].dy, + gv->video.page[/*!*/(gv->video.p)].dx, + gv->video.page[/*!*/(gv->video.p)].dy, + 96, 16); + modexprint(&(gv->video.page[/*!*/(gv->video.p)]), x, y, type, 1, col, bgcol, global_temp_status_text); //0000printf("dx=%u dy=%u\n", gv->video.page[/*!*/(gv->video.p)].dx, gv->video.page[/*!*/(gv->video.p)].dy); + } gv->kurokku.tiku=0; }else //copy dat sheet gv->kurokku.tiku++; diff --git a/src/zcroll.c b/src/zcroll.c index 342f3ba5..309d07e2 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -99,6 +99,7 @@ void main(int argc, char *argv[]) dpal = modexNewPal(); modexPalSave(dpal); modexFadeOff(4, dpal); + modexPalBlack(); #endif VGAmodeX(1/*bakapee*/, 1, &gvar); -- 2.39.5