• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

wwww


Commit MetaInfo

Revision46a8c35140479f5957e35eeb8cd27da9b9da6630 (tree)
Time2016-04-21 23:22:42
AuthorJonathan Campbell <jonathan@cast...>
CommiterJonathan Campbell

Log Message

textInit() for font. add variable so shinku() knows what page we're on.

Change Summary

Incremental Difference

--- a/src/lib/scroll16.c
+++ b/src/lib/scroll16.c
@@ -586,14 +586,16 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x)
586586 //setkb(0);
587587 }*/
588588
589+unsigned char shinku_fps_indicator_page = 0;
590+
589591 /* sync */
590592 void shinku(global_game_variables_t *gv)
591593 {
592594 //modexCopyPageRegion(pip[1].page, pip[2].page, 16, 16, 16, 16, (14*8)+4, 8+4);
593595 if(elapsed_timer(gv) >= (1.0 / gv->kurokku.frames_per_second))
594596 {
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
597599 word col = 7;
598600 word bgcol = 0;
599601 word type = 0;
@@ -602,7 +604,7 @@ void shinku(global_game_variables_t *gv)
602604 sprintf(gv->pee, "%f fps", (double)gv->kurokku.tiku/ticktock(gv));
603605 // printf("%s\n", gv->pee);
604606 //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);
606608 //++++ modexprint(&(gv->video.page[0]), x, y, type, col, bgcol, gv->pee);
607609 //(gv->clock_start)=*(gv->clock);
608610 gv->kurokku.tiku=0;
--- a/src/lib/scroll16.h
+++ b/src/lib/scroll16.h
@@ -81,4 +81,6 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x);
8181 void shinku(global_game_variables_t *gv);
8282 void near animatePlayer(map_view_t *pip, player_t *player, word playnum, sword scrollswitch);
8383
84+extern unsigned char shinku_fps_indicator_page;
85+
8486 #endif /*__SCROLL16_H_*/
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -134,7 +134,7 @@ void main(int argc, char *argv[])
134134 modexFadeOff(4, dpal);
135135 #endif
136136
137- //textInit();
137+ textInit();
138138 VGAmodeX(bakapee, 1, &gvar);
139139 // printf("%dx%d\n", gvar.video.page[0].sw, gvar.video.page[0].sh);
140140 #ifdef FADE
@@ -194,6 +194,7 @@ void main(int argc, char *argv[])
194194 #endif
195195
196196 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.
197198 //modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 1);
198199 #ifdef MODEX
199200 #ifdef FADE