From: sparky4 Date: Tue, 3 Nov 2015 17:46:52 +0000 (-0600) Subject: scroll.exe works again .... hmmm X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=1170e45860266537729a5a54eaafdf50511f5315;p=16.git scroll.exe works again .... hmmm --- diff --git a/16.exe b/16.exe index 406511f8..4033c177 100755 Binary files a/16.exe and b/16.exe differ diff --git a/bakapi.exe b/bakapi.exe index 8ee7381c..b1c9754f 100755 Binary files a/bakapi.exe and b/bakapi.exe differ diff --git a/exmmtest.exe b/exmmtest.exe index 03c0547f..b8d0240f 100755 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/fmemtest.exe b/fmemtest.exe index fa7f23df..5b900e67 100755 Binary files a/fmemtest.exe and b/fmemtest.exe differ diff --git a/fontgfx.exe b/fontgfx.exe index a8e981bf..0726c237 100755 Binary files a/fontgfx.exe and b/fontgfx.exe differ diff --git a/fonttest.exe b/fonttest.exe index 1a6d3db8..f92b49a3 100755 Binary files a/fonttest.exe and b/fonttest.exe differ diff --git a/inputest.exe b/inputest.exe index abc012c0..57ffb9f2 100755 Binary files a/inputest.exe and b/inputest.exe differ diff --git a/maptest.exe b/maptest.exe index 851aaf1f..d26b9e7e 100755 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/palettec.exe b/palettec.exe index fb1d9e1b..3d237fce 100755 Binary files a/palettec.exe and b/palettec.exe differ diff --git a/palettel.exe b/palettel.exe index cdfb2931..d076fe94 100755 Binary files a/palettel.exe and b/palettel.exe differ diff --git a/planrpcx.exe b/planrpcx.exe index 9bf6ef26..d8301b34 100755 Binary files a/planrpcx.exe and b/planrpcx.exe differ diff --git a/scroll.exe b/scroll.exe index ec59343c..f7ce4bec 100755 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/16_in.h b/src/lib/16_in.h index 08ce66fd..d910f3ec 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -223,7 +223,7 @@ typedef struct word d; //direction!! wwww word q; //loop variable word speed; //player speed! - planar_buf_t data; //supposively the sprite sheet data +// planar_buf_t data; //supposively the sprite sheet data // bitmap_t data; //supposively the sprite sheet data sword hp; //hitpoints of the player int persist_aniframe; /* gonna be increased to 1 before being used, so 0 is ok for default */ diff --git a/src/lib/mapread.h b/src/lib/mapread.h index b8062211..b2bf0fd4 100755 --- a/src/lib/mapread.h +++ b/src/lib/mapread.h @@ -17,7 +17,7 @@ typedef struct { bitmap_t huge *btdata; -// planar_buf_t huge *data; + planar_buf_t huge *data; word tileHeight; word tileWidth; unsigned int rows; diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 14680260..347062bd 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -60,7 +60,7 @@ void walk(map_view_t *pip, player_t *player, word pn) { modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); #ifdef SPRITE - PBUFFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 24, 32, &player[pn].data); + PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 24, 32, &player[pn].data); #else modexClearRegion(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 14); #endif @@ -101,7 +101,7 @@ void walk(map_view_t *pip, player_t *player, word pn) { modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); #ifdef SPRITE - PBUFFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 96, 24, 32, &player[pn].data); + PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 96, 24, 32, &player[pn].data); #else modexClearRegion(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 10); #endif @@ -142,7 +142,7 @@ void walk(map_view_t *pip, player_t *player, word pn) { modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); #ifdef SPRITE - PBUFFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 64, 24, 32, &player[pn].data); + PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 64, 24, 32, &player[pn].data); #else modexClearRegion(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 9); #endif @@ -183,7 +183,7 @@ void walk(map_view_t *pip, player_t *player, word pn) { modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); #ifdef SPRITE - PBUFFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 0, 24, 32, &player[pn].data); + PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 0, 24, 32, &player[pn].data); #else modexClearRegion(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 12); #endif @@ -488,8 +488,8 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((t->debug_data[i])+1)*2); //cannot print number value du to it being slow as bakapee #else - //0000modexDrawBmpPBufRegion(page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data)); - modexDrawBmpRegion(page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->btdata)); + PBUFBFUN(page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data)); + //modexDrawBmpRegion(page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->btdata)); #endif break; case 1: @@ -661,10 +661,10 @@ void near animatePlayer(map_view_t *pip, player_t *player, word playnum, sword s } #ifdef SPRITE -#define FRAME1 PBUFFUN(pip[1].page, x, y, 48, dire, 24, 32, &player[playnum].data); -#define FRAME2 PBUFFUN(pip[1].page, x, y, 24, dire, 24, 32, &player[playnum].data); -#define FRAME3 PBUFFUN(pip[1].page, x, y, 0, dire, 24, 32, &player[playnum].data); -#define FRAME4 PBUFFUN(pip[1].page, x, y, 24, dire, 24, 32, &player[playnum].data); +#define FRAME1 PBUFSFUN(pip[1].page, x, y, 48, dire, 24, 32, &player[playnum].data); +#define FRAME2 PBUFSFUN(pip[1].page, x, y, 24, dire, 24, 32, &player[playnum].data); +#define FRAME3 PBUFSFUN(pip[1].page, x, y, 0, dire, 24, 32, &player[playnum].data); +#define FRAME4 PBUFSFUN(pip[1].page, x, y, 24, dire, 24, 32, &player[playnum].data); #else #define FRAME1 modexClearRegion(pip[1].page, x, y, 24, 32, 2+dire); #define FRAME2 modexClearRegion(pip[1].page, x, y, 24, 32, 1+dire); diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 4ec26e9a..94d3cf82 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -33,10 +33,12 @@ #include "src/lib/timer.h" #include "src/lib/wcpu/wcpu.h" -#define SPRITE -#define PBUFFUN modexDrawBmpPBufRegion +//#define SPRITE //#define TILERENDER +#define PBUFSFUN modexDrawSpritePBufRegion +#define PBUFBFUN modexDrawBmpPBufRegion + typedef struct { map_t *map; page_t *page; diff --git a/src/scroll.c b/src/scroll.c index 23307d63..eb600195 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -39,8 +39,6 @@ bitmap_t p; float t; sword bakapee; -void main(int argc, char *argv[]) -{ // word panswitch=0, panq=1, pand=0; word panpagenum=0; //for panning! unsigned int i; @@ -56,6 +54,10 @@ void main(int argc, char *argv[]) byte *gpal; byte *ptr; byte *mappalptr; + +void main(int argc, char *argv[]) +{ + byte *mesg=malloc(sizeof(dword)); @@ -75,8 +77,6 @@ void main(int argc, char *argv[]) /* create the map */ fprintf(stderr, "testing map load~\n"); loadmap("data/test.map", &map); -//0000 map.width=0; -//0000 map.height=0; chkmap(&map, 0); printf("chkmap ok\n"); fprintf(stderr, "yay map loaded~~\n"); @@ -94,8 +94,8 @@ void main(int argc, char *argv[]) //npctmp = bitmapLoadPcx("ptmp1.pcx"); // load sprite /* create the planar buffer */ - (player[0].data) = *planar_buf_from_bitmap(&p); -//0000 printf("planar buffer ok\n"); +////++++ (player[0].data) = *planar_buf_from_bitmap(&p); + #endif /* input! */ IN_Startup(); @@ -113,7 +113,7 @@ void main(int argc, char *argv[]) textInit(); VGAmodeX(bakapee, &gvar); - printf("%dx%d\n", gvar.video.page[0].sw, gvar.video.page[0].sh); +// printf("%dx%d\n", gvar.video.page[0].sw, gvar.video.page[0].sh); #ifdef FADE modexPalBlack(); //reset the palette~ #endif @@ -145,6 +145,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, 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]; @@ -153,12 +154,12 @@ void main(int argc, char *argv[]) bg = &mv[0]; spri = &mv[1]; mask = &mv[2]; - +//IN_Ack(); //TODO: LOAD map data and position the map in the middle of the screen if smaller then screen mapGoTo(bg, 0, 0); mapGoTo(spri, 0, 0); //mapGoTo(mask, 0, 0); - +//IN_Ack(); //TODO: put player in starting position of spot //default player position on the viewable map player[0].tx = bg->tx + bg->page->tilemidposscreenx; @@ -185,15 +186,16 @@ 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);*/ +IN_Ack(); modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height); -#ifdef SPRITE +#ifndef SPRITE modexClearRegion(mv[1].page, player[0].x-4, player[0].y-TILEWH, 24, 32, 15); #else - modexDrawSpritePBufRegion(spri->page, player[0].x-4, player[0].y-TILEWH, 24, 64, 24, 32, &player[0].data); + PBUFSFUN(spri->page, player[0].x-4, player[0].y-TILEWH, 24, 64, 24, 32, &player[0].data); #endif - +IN_Ack(); modexShowPage(spri->page); - modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 1); + //modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 1); #ifdef MODEX #ifdef FADE modexFadeOn(4, gpal); diff --git a/test.exe b/test.exe index 7f1b675f..c9ba9e3b 100755 Binary files a/test.exe and b/test.exe differ diff --git a/vgmtest.exe b/vgmtest.exe index e2a5d709..b63d956e 100755 Binary files a/vgmtest.exe and b/vgmtest.exe differ