]> 4ch.mooo.com Git - 16.git/blobdiff - src/scroll.c
updating
[16.git] / src / scroll.c
index 92b26f2e78e6de979def5efae33635698f9ea6b9..55df4a4b40ce8481db4da50e67a7cdae18f1ef4d 100755 (executable)
@@ -44,15 +44,16 @@ void main(int argc, char *argv[])
 //     word panswitch=0, panq=1, pand=0;
        word panpagenum=0; //for panning!
        unsigned int i;
-       //static word paloffset=0;
        const char *cpus;
        //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
+//#ifdef FADE
+       static word paloffset=0;
+       byte *dpal, *default_pal;
+//#endif
+       byte *gpal;
        byte *ptr;
        byte *mappalptr;
        byte *mesg=malloc(sizeof(dword));
@@ -104,6 +105,8 @@ void main(int argc, char *argv[])
 #ifdef MODEX
 #ifdef FADE
        dpal = modexNewPal();
+       default_pal = modexNewPal();
+       *default_pal = *dpal;
        modexPalSave(dpal);
        modexFadeOff(4, dpal);
 #endif
@@ -387,6 +390,9 @@ void main(int argc, char *argv[])
                _fmemset(((mv[pg].page->data+4)+(16*(mv[pg].page->width/4))), 15, 4);
        }
 
+       //9
+       if(IN_KeyDown(10)){ modexPalOverscan(default_pal, rand()%56); modexPalUpdate1(default_pal); }
+       //if(IN_KeyDown(11)){ modexPalOverscan(default_pal, 15); }
        if((player[0].q==1) && !(player[0].x%TILEWH==0 && player[0].y%TILEWH==0)) break;        //incase things go out of sync!
        }