X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fzcroll.c;h=ed2341bb37e629d758bcafe5ab8e1227c3009c97;hb=3bccccc5b1bd97dc63e3caccc800959e9e5948db;hp=9b6ba75f2f8c2072360d0e2e59552d0a698e27ad;hpb=ffbad4972c8eed182edd7c0ba1fef0bc1d457bf2;p=16.git diff --git a/src/zcroll.c b/src/zcroll.c index 9b6ba75f..ed2341bb 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -34,7 +34,7 @@ float t; //debugswitches boolean panswitch=0,baka=0; //extern boolean pageflipflop=1; -boolean pagenorendermap = 0; //default: 0 +extern boolean pagenorendermap; //default: 0 unsigned int i; #ifdef FADE @@ -82,7 +82,7 @@ void main(int argc, char *argv[]) // create the map // fprintf(stderr, "testing map load~ "); - loadmap("data/test.map", &map); + CA_loadmap("data/test.map", &map, &gvar); chkmap(&map, 0); // initMap(&map); // printf("chkmap ok "); @@ -103,15 +103,16 @@ void main(int argc, char *argv[]) VGAmodeX(1/*bakapee*/, 1, &gvar); - /* fix up the palette and everything */ -#ifdef FADE - modexPalBlack(); //reset the palette~ -#endif - /* load color palette */ + /*ptmp.offset=(paloffset/3); + modexPalUpdate(&ptmp, &paloffset, 0, 0); + //modexClearRegion(bg->page, 0, 0, 320, 240, 255); + //printf(" %d\n", sizeof(ptmp.data)); + //printf("1: %d\n", paloffset); + map.tiles->data->offset=(paloffset/3); + modexPalUpdate(map.tiles->data, &paloffset, 0, 0);*/ VL_LoadPalFile(bakapee1p, &gvar.video.palette); -// CA_LoadFile("data/spri/"BAKAPEEFILE1".pal", &pal, &gvar); -// modexPalUpdate1(pal); + #ifdef FADE gpal = modexNewPal(); modexPalSave(gpal); @@ -142,12 +143,16 @@ void main(int argc, char *argv[]) } // while(!IN_KeyDown(sc_Escape) && !IN_KeyDown(sc_Space) && !IN_KeyDown(sc_Enter)){ FUNCTIONKEYSHOWMV } + gvar.video.page[0].tlx=mv[0].tx*TILEWH; + gvar.video.page[0].tly=mv[0].ty*TILEWH; shinku(&gvar); #ifdef FADE modexFadeOn(4, gpal); #endif while(!IN_KeyDown(sc_Escape) && player[0].enti.hp>0) { + gvar.video.page[0].tlx=mv[0].tx*TILEWH; + gvar.video.page[0].tly=mv[0].ty*TILEWH; shinku(&gvar); //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 @@ -202,7 +207,7 @@ void main(int argc, char *argv[]) VL_LoadPalFile(bakapee1p, &gvar.video.palette); }//JK #ifdef FADE - if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(dpal); IN_UserInput(1,1); } + if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate(dpal); IN_UserInput(1,1); } #endif if(IN_KeyDown(sc_R)){ modexPalOverscan(rand()%56); } //r