]> 4ch.mooo.com Git - 16.git/blobdiff - src/scroll.c
wwww
[16.git] / src / scroll.c
index 94a12eda69b3dd5a2f408015b47c5ce9f7a5af53..af5c48f429cf839e2ea40fb16b61a63861e4a5be 100755 (executable)
@@ -21,7 +21,7 @@
  */
 
 #include "src/lib/scroll16.h"
-//#include "src/lib/mapread.h"
+#include "src/lib/timer.h"
 #include "src/lib/wcpu/wcpu.h"
 
 //#define FADE
@@ -48,6 +48,7 @@ void main()
        //static int persist_aniframe = 0;    /* gonna be increased to 1 before being used, so 0 is ok for default */
 
        //map_view_db_t pgid[4];
+       word pg;
 #ifdef FADE
        byte *dpal, *gpal;
 #endif
@@ -57,12 +58,10 @@ void main()
 
        player[0].persist_aniframe=0;
        player[0].speed=4;
-       gvar.clock_start=*hwclockw;
-       //0000printf("starting timer\n");
-//++++
-       //++++????start_timer(&gvar);
-//++++ gvar.frames_per_second = 60;
-//0000 printf("ok\n");
+
+       printf("starting timer\n");
+       start_timer(&gvar);
+       printf("ok\n");
        //extern struct inconfig inpu;
 
 //     atexit(qclean());
@@ -187,7 +186,6 @@ void main()
 #endif
 
        modexShowPage(spri->page);
-//     printf("Total used @ before loop:                       %zu\n", oldfreemem-GetFreeSize());
        modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 1);
 #ifdef MODEX
 #ifdef FADE
@@ -196,9 +194,7 @@ void main()
 #endif
        while(!IN_KeyDown(sc_Escape) && player[0].hp>0)
        {
-               sprintf(mesg, "%lu", gvar.tiku);
-               modexprint(mv[1].page, 16, 16, 1, 15, 0, mesg);
-               shinku(mv[1].page, &gvar);
+               shinku(mv, &gvar);
                IN_ReadControl(0,&player);
        //top left corner & bottem right corner of map veiw be set as map edge trigger since maps are actually square
        //to stop scrolling and have the player position data move to the edge of the screen with respect to the direction
@@ -363,10 +359,28 @@ void main()
                        int 21h
                }
        }
+       if(IN_KeyDown(88))      //s
+       {
+               switch(gvar.kurokku.fpscap)
+               {
+                       case 0:
+                               gvar.kurokku.fpscap=1;
+                       break;
+                       case 1:
+                               gvar.kurokku.fpscap=0;
+                       break;
+               }
+               IN_Ack();
+       }
+       //TODO fmemtest into page
+       if(IN_KeyDown(4+1))     //4
+       {
+               pg=1;
+               SELECT_ALL_PLANES();
+               _fmemset(((mv[pg].page->data+4)+(16*(mv[pg].page->width/4))), 15, 4);
+       }
 
        if((player[0].q==1) && !(player[0].x%TILEWH==0 && player[0].y%TILEWH==0)) break;        //incase things go out of sync!
-
-       gvar.tiku++;
        }
 
        /* fade back to text mode */