\r
void near mapScrollRight(map_view_t *mv, player_t *player, word id, word plid)\r
{\r
- word x, y; /* coordinate for drawing */\r
+ word x;//, y; /* coordinate for drawing */\r
\r
/* increment the pixel position and update the page */\r
mv[id].page->dx += player[plid].speed;\r
\r
void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid)\r
{\r
- word x, y; /* coordinate for drawing */\r
+ word x;//,y; /* coordinate for drawing */\r
\r
/* decrement the pixel position and update the page */\r
mv[id].page->dx -= player[plid].speed;\r
\r
void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid)\r
{\r
- word x, y; /* coordinate for drawing */\r
+ word y;//x, /* coordinate for drawing */\r
\r
/* decrement the pixel position and update the page */\r
mv[id].page->dy -= player[plid].speed;\r
\r
void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid)\r
{\r
- word x, y; /* coordinate for drawing */\r
+ word y;//x, /* coordinate for drawing */\r
\r
/* increment the pixel position and update the page */\r
mv[id].page->dy += player[plid].speed;\r
//TODO: player position here\r
void mapGoTo(map_view_t *mv, int tx, int ty)\r
{\r
- int px, py;\r
+ int py;//px,\r
unsigned int i;\r
\r
/* set up the coordinates */\r
{\r
word rx;\r
word ry;\r
- word textx=0;\r
- word texty=0;\r
+ //word textx=0, texty=0;\r
//if(i==0) i=2;\r
if(i==0)\r
{\r
{\r
word x = (0) + gv->video.page[/*!*/(gv->video.p)].dx; // follow the screen\r
word y = (0) + gv->video.page[/*!*/(gv->video.p)].dy; // follow the screen\r
- word w = 64, h = 8, col = 7, bgcol = 0, type = 1;\r
- byte o,o2,i;\r
+ word col = 7, bgcol = 0, type = 1;//w = 64, h = 8,\r
+ //byte o,o2,i;\r
//modexCopyPageRegion(pip[1].page, pip[2].page, 16, 16, 16, 16, (14*8)+4, 8+4);\r
/* block copy to visible RAM from offscreen */\r
// vga_setup_wm1_block_copy();\r
// vga_restore_rm0wm0();\r
if(elapsed_timer(gv) >= (1.0 / gv->kurokku.frames_per_second))\r
{\r
- sprintf(gv->pee, "%.0f fps", (double)gv->kurokku.tiku/ticktock(gv));\r
+ // NTS: For some bizarre reason, gv->pee is not initialized, but the pointer is not NULL even\r
+ // though it should be. Instead it's NULL as a near pointer but contains a non-null\r
+ // segment value, so testing against NULL doesn't work. It is initialized properly if\r
+ // you call start_timer() though which uses near malloc. Rather than fight with that,\r
+ // I decided it would be better to declare a temp buffer statically and sprintf to that.\r
+ //\r
+ // This fixes *** Null pointer assignment detected error message in ZCROLL.EXE on exit.\r
+ sprintf(global_temp_status_text, "%.0f fps", (double)gv->kurokku.tiku/ticktock(gv));\r
//modexClearRegion(&(gv->video.page[shinku_fps_indicator_page]), x, y, w, h, 45);\r
- modexprint(&(gv->video.page[/*!*/(gv->video.p)]), x, y, type, col, bgcol, gv->pee);\r
+ modexprint(&(gv->video.page[/*!*/(gv->video.p)]), x, y, type, col, bgcol, global_temp_status_text);\r
gv->kurokku.tiku=0;\r
/* block copy to visible RAM from offscreen */\r
// vga_setup_wm1_block_copy();\r