OSDN Git Service

optimize for XT i did ww
authorsparky4 <sparky4@cock.li>
Thu, 16 Jun 2016 16:50:58 +0000 (11:50 -0500)
committersparky4 <sparky4@cock.li>
Thu, 16 Jun 2016 16:50:58 +0000 (11:50 -0500)
src/lib/16_timer.c
src/lib/scroll16.c
src/scroll.c

index 6d00448..e45ee94 100755 (executable)
@@ -28,16 +28,18 @@ clock_t start_timer(global_game_variables_t *gv)
        gv->kurokku.tiku = 0;\r
        gv->kurokku.clock_start = *clockw;\r
        gv->kurokku.clock = clockw;\r
-       gv->kurokku.frames_per_second = 60;\r
+       //gv->kurokku.frames_per_second = 60;\r
        gv->pee = _nmalloc(sizeof(byte)*16);\r
        //turn this off if XT\r
        switch(detectcpu())\r
        {\r
                case 0:\r
                        gv->kurokku.fpscap=0;\r
+                       gv->kurokku.frames_per_second=1;\r
                break;\r
                default:\r
                        gv->kurokku.fpscap=1;\r
+                       gv->kurokku.frames_per_second=60;\r
                break;\r
        }\r
        return gv->kurokku.t;\r
@@ -79,17 +81,17 @@ void shinkutxt(global_game_variables_t *gv)
                gv->kurokku.tiku=0;\r
        }\r
        gv->kurokku.tiku++;\r
-       switch(gv->kurokku.fpscap)\r
-       {\r
-               case 0:\r
-                       gv->kurokku.frames_per_second=1;\r
-               break;\r
-               case 1:\r
-                       //turn this off if XT\r
-                       WaitPee();\r
-                       gv->kurokku.frames_per_second=60;\r
-               break;\r
-       }\r
+//     switch(gv->kurokku.fpscap)\r
+//     {\r
+//             case 0:\r
+//                     gv->kurokku.frames_per_second=1;\r
+//             break;\r
+//             case 1:\r
+//                     //turn this off if XT\r
+//                     WaitPee();\r
+//                     gv->kurokku.frames_per_second=60;\r
+//             break;\r
+//     }\r
 }\r
 \r
 void WaitPee()\r
index 711d4bc..c36c5f3 100755 (executable)
@@ -802,6 +802,19 @@ void shinku(global_game_variables_t *gv)
        }else //copy dat sheet
        gv->kurokku.tiku++;
 
+       switch(gv->kurokku.fpscap)
+       {
+               case 0:
+                       modexprint(&(gv->video.page[shinku_fps_indicator_page]), x, y+8, type, col, bgcol, "sanic!");
+                       gv->kurokku.frames_per_second=1;
+               break;
+               case 1:
+                       //turn this off if XT
+                       //modexWaitBorder();
+                       vga_wait_for_vsync();
+                       gv->kurokku.frames_per_second=60;
+               break;
+       }
        if(pageflipflop){
        if(gv->video.r){
                /* block copy pattern to where we will draw the sprite */
index 18c5311..fa6df24 100755 (executable)
@@ -96,9 +96,9 @@ void main(int argc, char *argv[])
        pan.pn=1;
        //player[0].data = &pp;
 
-       printf("starting timer  ");
+       //printf("starting timer        ");
        start_timer(&gvar);
-       printf("ok\n");
+       //printf("ok\n");
 
 //     atexit(qclean());
 
@@ -291,13 +291,9 @@ void main(int argc, char *argv[])
                switch(gvar.kurokku.fpscap)
                {
                        case 0:
-                               //modexprint(&(gv->video.page[shinku_fps_indicator_page]), x, y+8, type, col, bgcol, "sanic!");
                                gvar.kurokku.frames_per_second=1;
                        break;
                        case 1:
-                               //turn this off if XT
-                               //modexWaitBorder();
-                               vga_wait_for_vsync();
                                gvar.kurokku.frames_per_second=60;
                        break;
                }