]> 4ch.mooo.com Git - 16.git/blobdiff - src/scroll.c
wwww
[16.git] / src / scroll.c
index cb74dfb392f8d3f1a6fa9b34ff033ecd8fae8c70..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
@@ -141,7 +144,7 @@ void main(int argc, char *argv[])
        mv[0].page = &gvar.video.page[0];
        gvar.video.page[1] = modexNextPage(mv[0].page);
        mv[1].page = &gvar.video.page[1];
-       gvar.video.page[2] = modexNextPageFlexibleSize(mv[1].page, page[0].sw, page[0].sh);     //(352*176)+1024 is the remaining amount of memory left wwww
+       gvar.video.page[2] = modexNextPageFlexibleSize(mv[1].page, gvar.video.page[0].sw, gvar.video.page[0].sh);       //(352*176)+1024 is the remaining amount of memory left wwww
        //gvar.video.page[2] = modexNextPage0(mv2.page, 320, 192);      //(352*176)+1024 is the remaining amount of memory left wwww
        mv[2].page = &gvar.video.page[2];
 
@@ -181,6 +184,7 @@ void main(int argc, char *argv[])
        npc0.q=1;
        npc0.d=0;
        modexDrawSpriteRegion(spri->page, npc0.x-4, npc0.y-TILEWH, 24, 64, 24, 32, &npctmp);*/
+       modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height);
 #ifdef SPRITE
 #ifdef BMPTYPE
        oldDrawBmp(VGA, player[0].x-4, player[0].y-TILEWH, &player[0].data, 1);
@@ -386,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!
        }
 
@@ -418,6 +425,7 @@ void main(int argc, char *argv[])
 //not used now printf("temporary player sprite 1: http://www.pixiv.net/member_illust.php?mode=medium&illust_id=44606385\n");
        printf("Virtual Screen: %dx", gvar.video.page[0].width);        printf("%d\n", gvar.video.page[0].height);
        printf("Screen: %dx", gvar.video.page[0].sw);   printf("%d\n", gvar.video.page[0].sh);
+       printf("tile resolution: %dx", gvar.video.page[0].tilesh);      printf("%d\n", gvar.video.page[0].tilesh);
        printf("middle tile position: %dx", gvar.video.page[0].tilemidposscreenx);      printf("%d\n", gvar.video.page[0].tilemidposscreeny);
 //     printf("Screen2: %dx", gvar.video.page[1].width);       printf("%d\n", gvar.video.page[1].height);
 //     printf("map: %dx%d\n", map.width, map.height);