wwww
Revision | 46a8c35140479f5957e35eeb8cd27da9b9da6630 (tree) |
---|---|
Time | 2016-04-21 23:22:42 |
Author | Jonathan Campbell <jonathan@cast...> |
Commiter | Jonathan Campbell |
textInit() for font. add variable so shinku() knows what page we're on.
@@ -586,14 +586,16 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x) | ||
586 | 586 | //setkb(0); |
587 | 587 | }*/ |
588 | 588 | |
589 | +unsigned char shinku_fps_indicator_page = 0; | |
590 | + | |
589 | 591 | /* sync */ |
590 | 592 | void shinku(global_game_variables_t *gv) |
591 | 593 | { |
592 | 594 | //modexCopyPageRegion(pip[1].page, pip[2].page, 16, 16, 16, 16, (14*8)+4, 8+4); |
593 | 595 | if(elapsed_timer(gv) >= (1.0 / gv->kurokku.frames_per_second)) |
594 | 596 | { |
595 | - word x = (16); | |
596 | - word y = (16); | |
597 | + word x = (16) + gv->video.page[shinku_fps_indicator_page].dx; // follow the screen | |
598 | + word y = (16) + gv->video.page[shinku_fps_indicator_page].dy; // follow the screen | |
597 | 599 | word col = 7; |
598 | 600 | word bgcol = 0; |
599 | 601 | word type = 0; |
@@ -602,7 +604,7 @@ void shinku(global_game_variables_t *gv) | ||
602 | 604 | sprintf(gv->pee, "%f fps", (double)gv->kurokku.tiku/ticktock(gv)); |
603 | 605 | // printf("%s\n", gv->pee); |
604 | 606 | //FIXME PLEASE!! |
605 | - modexprint(&(gv->video.page[0]), x, y, type, col, bgcol, gv->pee); | |
607 | + modexprint(&(gv->video.page[shinku_fps_indicator_page]), x, y, type, col, bgcol, gv->pee); | |
606 | 608 | //++++ modexprint(&(gv->video.page[0]), x, y, type, col, bgcol, gv->pee); |
607 | 609 | //(gv->clock_start)=*(gv->clock); |
608 | 610 | gv->kurokku.tiku=0; |
@@ -81,4 +81,6 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x); | ||
81 | 81 | void shinku(global_game_variables_t *gv); |
82 | 82 | void near animatePlayer(map_view_t *pip, player_t *player, word playnum, sword scrollswitch); |
83 | 83 | |
84 | +extern unsigned char shinku_fps_indicator_page; | |
85 | + | |
84 | 86 | #endif /*__SCROLL16_H_*/ |
@@ -134,7 +134,7 @@ void main(int argc, char *argv[]) | ||
134 | 134 | modexFadeOff(4, dpal); |
135 | 135 | #endif |
136 | 136 | |
137 | - //textInit(); | |
137 | + textInit(); | |
138 | 138 | VGAmodeX(bakapee, 1, &gvar); |
139 | 139 | // printf("%dx%d\n", gvar.video.page[0].sw, gvar.video.page[0].sh); |
140 | 140 | #ifdef FADE |
@@ -194,6 +194,7 @@ void main(int argc, char *argv[]) | ||
194 | 194 | #endif |
195 | 195 | |
196 | 196 | modexShowPage(mv[1].page); |
197 | + shinku_fps_indicator_page = 1; // we're on page 1 now, shinku(). follow along please or it will not be visible. | |
197 | 198 | //modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 1); |
198 | 199 | #ifdef MODEX |
199 | 200 | #ifdef FADE |