]> 4ch.mooo.com Git - 16.git/blobdiff - src/scroll.c
wwww yakuji wwww ca use to load maps w
[16.git] / src / scroll.c
index 56dd70fc24319b193059b6c33d0652e4a59ca690..2746ca4f1cc500316ba210f54ce75dc116b13871 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover
  *
  * This file is part of Project 16.
  *
@@ -34,13 +34,12 @@ static map_t map;
 player_t player[MaxPlayers];
 map_view_t mv[4];
 //word pn=0; //i forgot ww
-//static planar_buf_t huge *pp;
 float t;
 sword bakapee;
 pan_t pan;
 //debugswitches
 boolean panswitch=0;
-boolean pageflipflop=1;
+//extern boolean pageflipflop=1;
        unsigned int i;
        const char *cpus;
        //static int persist_aniframe = 0;    /* gonna be increased to 1 before being used, so 0 is ok for default */
@@ -49,7 +48,7 @@ boolean pageflipflop=1;
        word pg;
 //#ifdef FADE
        static word paloffset=0;
-       byte *dpal, *default_pal;
+       byte *dpal;
 //#endif
        byte *gpal;
        byte *ptr;
@@ -92,13 +91,8 @@ void main(int argc, char *argv[])
        _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U);
 
        pan.pn=1;
-       //player[0].data = &pp;
 
-       //printf("starting timer        ");
        start_timer(&gvar);
-       //printf("ok\n");
-
-//     atexit(qclean());
 
        /* create the map */
        fprintf(stderr, "testing map load~      ");
@@ -115,7 +109,6 @@ void main(int argc, char *argv[])
        /* data */
        player[0].data = malloc(48*128); //TODO use exmm
        *player[0].data = bitmapLoadPcx("data/chikyuu.pcx"); // load sprite
-       //npctmp = bitmapLoadPcx("ptmp1.pcx"); // load sprite
 
        /* create the planar buffer */
 ////++++       (player[0].data) = *planar_buf_from_bitmap(&p);
@@ -133,8 +126,6 @@ void main(int argc, char *argv[])
 #ifdef MODEX
 #ifdef FADE
        dpal = modexNewPal();
-       default_pal = modexNewPal();
-       *default_pal = *dpal;
        modexPalSave(dpal);
        modexFadeOff(4, dpal);
 #endif
@@ -291,9 +282,10 @@ void main(int argc, char *argv[])
        }
        if(IN_KeyDown(67))      //f9
        {
-//             modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 47);
-//             modexClearRegion(mv[3].page, 0, 0, mv[3].page->width, mv[3].page->height, 45);
-               modexClearRegion(mv[3].page, 0, 128, 28, 36, 15);
+               modexClearRegion(mv[1].page, 0, 0, mv[1].page->width, mv[1].page->height, 2);
+               modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 3);
+               modexClearRegion(mv[3].page, 0, 0, mv[3].page->width, mv[3].page->height, 4);
+               modexClearRegion(mv[3].page, 0, 0, 20, 36, 15);
                //IN_UserInput(1,1);
        }
        if(IN_KeyDown(66))      //f8
@@ -310,7 +302,7 @@ void main(int argc, char *argv[])
        }*/
 
        //9
-       if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(default_pal); IN_UserInput(1,1); }
+       if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(dpal); IN_UserInput(1,1); }
        //if(IN_KeyDown(11)){ modexPalOverscan(15); }
        if((player[0].q==1) && !(player[0].x%TILEWH==0 && player[0].y%TILEWH==0)) break;        //incase things go out of sync!
        }