]> 4ch.mooo.com Git - 16.git/commitdiff
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 6d00448fd698a68c16198154de86cca10ee2c59f..e45ee9484c4e6fe5d6b3c2322ebafea830815c55 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 711d4bc06e891fe95bb860a8131992798bf70081..c36c5f3f6ecd47c6087aebe99753c0d406118995 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 18c53111b084d7c798f85372cd4e5ab79183ef86..fa6df24b88708ad4bcb7a34ed1a4b088041472f5 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;
                }