wwww
リビジョン | d31b48962de4f4384cca54f92db59ccc0bb06fbc (tree) |
---|---|
日時 | 2016-04-21 23:00:04 |
作者 | Jonathan Campbell <jonathan@cast...> |
コミッター | Jonathan Campbell |
fix updated code to copy the char, not NUL char (doh!)
fix modex VGA init to set .width and .height page members.
shinku()'s fps indicator works now!
@@ -95,6 +95,9 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv) | ||
95 | 95 | /* width and height */ |
96 | 96 | gv->video.page[0].sw = vga_state.vga_width = 320; // VGA lib currently does not update this |
97 | 97 | gv->video.page[0].sh = vga_state.vga_height = 240; // VGA lib currently does not update this |
98 | + /* virtual width and height. match screen, at first */ | |
99 | + gv->video.page[0].height = gv->video.page[0].sh; | |
100 | + gv->video.page[0].width = gv->video.page[0].sw; | |
98 | 101 | |
99 | 102 | // mode X BYTE mode |
100 | 103 | cm.word_mode = 0; |
@@ -907,7 +910,7 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons | ||
907 | 910 | // load the character into romFontsData.l |
908 | 911 | // no need for inline assembly! |
909 | 912 | // NTS: It might even be faster to just let the modexDrawChar point directly at ROM font than to copy per char! --J.C. |
910 | - _fmemcpy(romFontsData.l,MK_FP(s,o)/*ROM font location*/,w/*char size*/); | |
913 | + _fmemcpy(romFontsData.l,MK_FP(s,o+(w*c))/*ROM font location*/,w/*char size*/); | |
911 | 914 | modexDrawChar(page, x_draw/*for mode X planar use*/, t, col, bgcol, addrr); |
912 | 915 | x_draw += 8; /* track X for edge of screen */ |
913 | 916 | addrr += 2; /* move 8 pixels over (2 x 4 planar pixels per byte) */ |
@@ -594,14 +594,15 @@ void shinku(global_game_variables_t *gv) | ||
594 | 594 | { |
595 | 595 | word x = (16); |
596 | 596 | word y = (16); |
597 | - word col = 1; | |
597 | + word col = 7; | |
598 | 598 | word bgcol = 0; |
599 | - word type = 1; | |
599 | + word type = 0; | |
600 | + | |
600 | 601 | //t=(((*(gv->clock))-gv->clock_start) /18.2); |
601 | 602 | sprintf(gv->pee, "%f fps", (double)gv->kurokku.tiku/ticktock(gv)); |
602 | - printf("%s\n", gv->pee); | |
603 | +// printf("%s\n", gv->pee); | |
603 | 604 | //FIXME PLEASE!! |
604 | - modexprint(&(gv->video.page[0]), 200, 200, type, col, bgcol, gv->pee); | |
605 | + modexprint(&(gv->video.page[0]), x, y, type, col, bgcol, gv->pee); | |
605 | 606 | //++++ modexprint(&(gv->video.page[0]), x, y, type, col, bgcol, gv->pee); |
606 | 607 | //(gv->clock_start)=*(gv->clock); |
607 | 608 | gv->kurokku.tiku=0; |