]> 4ch.mooo.com Git - 16.git/commitdiff
i am going to work on a really big area of code it will be on the refresh system...
authorsparky4 <sparky4@cock.li>
Fri, 13 Jan 2017 00:28:14 +0000 (18:28 -0600)
committersparky4 <sparky4@cock.li>
Fri, 13 Jan 2017 00:28:14 +0000 (18:28 -0600)
src/lib/scroll16.c
src/lib/scroll16.h
src/scroll.c
src/test.c

index 9fae78b38aec1f19654d8ebd6c009c02e229b742..cab3823fcd33b682d30cd47195a6afe6a08d20dd 100755 (executable)
@@ -68,7 +68,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
                        {\r
                                if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x, player[pn].y-TILEWH, player[pn].x, player[pn].y-TILEWH, 24, 32);\r
 #ifdef SPRITE\r
-                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 24, 32, PLAYERBMPDATAPTR);\r
+                               modexDrawSpriteRegion(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 24, 32, PLAYERBMPDATAPTR);\r
 #else\r
                                modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 14);\r
 #endif\r
@@ -112,7 +112,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
                        {\r
                                if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x, player[pn].y-TILEWH, player[pn].x, player[pn].y-TILEWH, 24, 32);\r
 #ifdef SPRITE\r
-                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 96, 24, 32, PLAYERBMPDATAPTR);\r
+                               modexDrawSpriteRegion(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 96, 24, 32, PLAYERBMPDATAPTR);\r
 #else\r
                                modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 10);\r
 #endif\r
@@ -156,7 +156,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
                        {\r
                                if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x, player[pn].y-TILEWH, player[pn].x, player[pn].y-TILEWH, 24, 32);\r
 #ifdef SPRITE\r
-                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATAPTR);\r
+                               modexDrawSpriteRegion(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATAPTR);\r
 #else\r
                                modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 9);\r
 #endif\r
@@ -200,7 +200,7 @@ void walk(map_view_t *pip, player_t *player, word pn)
                        {\r
                                if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x, player[pn].y-TILEWH, player[pn].x, player[pn].y-TILEWH, 24, 32);\r
 #ifdef SPRITE\r
-                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 0, 24, 32, PLAYERBMPDATAPTR);\r
+                               modexDrawSpriteRegion(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 0, 24, 32, PLAYERBMPDATAPTR);\r
 #else\r
                                modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 12);\r
 #endif\r
@@ -261,7 +261,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        else\r
                        {\r
 #ifdef SPRITE\r
-                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 24, 32, PLAYERBMPDATAPTR);\r
+                               modexDrawSpriteRegion(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 24, 32, PLAYERBMPDATAPTR);\r
 #else\r
                                modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 14);\r
 #endif\r
@@ -299,7 +299,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        else\r
                        {\r
 #ifdef SPRITE\r
-                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 96, 24, 32, PLAYERBMPDATAPTR);\r
+                               modexDrawSpriteRegion(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 96, 24, 32, PLAYERBMPDATAPTR);\r
 #else\r
                                modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 10);\r
 #endif\r
@@ -337,7 +337,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        else\r
                        {\r
 #ifdef SPRITE\r
-                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATAPTR);\r
+                               modexDrawSpriteRegion(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATAPTR);\r
 #else\r
                                modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 9);\r
 #endif\r
@@ -375,7 +375,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                        else\r
                        {\r
 #ifdef SPRITE\r
-                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 0, 24, 32, PLAYERBMPDATAPTR);\r
+                               modexDrawSpriteRegion(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 0, 24, 32, PLAYERBMPDATAPTR);\r
 #else\r
                                modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 12);\r
 #endif\r
@@ -925,7 +925,7 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)
                                modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((dbg_mapdata[i])+1));\r
                                //modexprint(page, x, y, 1, 15, 0, (char const *)(t->debug_data[i]));\r
 #else\r
-                               PBUFBFUN                (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data));\r
+                               modexDrawBmpRegion              (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data));\r
                                /* then the sprite. note modding ram ptr means we just draw to (x&3,0) */\r
                                //draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));\r
                                //modexDrawBmpRegion    (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data));\r
@@ -1147,10 +1147,10 @@ void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scroll
        }\r
 \r
 #ifdef SPRITE\r
-#define FRAME1 PBUFSFUN(pip[/*!*/(pip->video->p)].page, x, y, 48, dire, 24, 32,        PLAYERBMPDATAPTR);\r
-#define FRAME2 PBUFSFUN(pip[/*!*/(pip->video->p)].page, x, y, 24, dire, 24, 32,        PLAYERBMPDATAPTR);\r
-#define FRAME3 PBUFSFUN(pip[/*!*/(pip->video->p)].page, x, y, 0, dire, 24, 32, PLAYERBMPDATAPTR);\r
-#define FRAME4 PBUFSFUN(pip[/*!*/(pip->video->p)].page, x, y, 24, dire, 24, 32,        PLAYERBMPDATAPTR);\r
+#define FRAME1 modexDrawSpriteRegion(pip[/*!*/(pip->video->p)].page, x, y, 48, dire, 24, 32,   PLAYERBMPDATAPTR);\r
+#define FRAME2 modexDrawSpriteRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, dire, 24, 32,   PLAYERBMPDATAPTR);\r
+#define FRAME3 modexDrawSpriteRegion(pip[/*!*/(pip->video->p)].page, x, y, 0, dire, 24, 32,    PLAYERBMPDATAPTR);\r
+#define FRAME4 modexDrawSpriteRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, dire, 24, 32,   PLAYERBMPDATAPTR);\r
 #else\r
 #define FRAME1 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, 32, 2+dire);\r
 #define FRAME2 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, 32, 1+dire);\r
index 7830f1f9951ad0df2ff0fc1df2ef8c6586e74dd9..8feb3f48019369282f837ae46768edec5dd90b55 100755 (executable)
 #include <hw/vga/vga.h>\r
 #include <hw/vga/vrl.h>\r
 \r
-#define SPRITE\r
+//#define SPRITE\r
 //#define TILERENDER\r
 \r
-extern void modexDrawSpriteRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp);\r
+//extern void modexDrawSpriteRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp);\r
 \r
 //modexDrawSpritePBufRegion\r
 //modexDrawBmpPBufRegion\r
-#define PBUFSFUN               modexDrawSpriteRegion\r
-#define PBUFBFUN               modexDrawBmpRegion\r
+//#define PBUFSFUN             modexDrawSpriteRegion\r
+//#define PBUFBFUN             modexDrawBmpRegion\r
 \r
 #define PLAYERBMPDATAVAR       player[pn].data\r
 #define PLAYERBMPDATA          *PLAYERBMPDATAVAR\r
index ceb76bcc9f4eb183074ec24ad58c72ea708b9ae2..cfb6ab2e36ea0e68ff231a68a2e2e479a7f55f9a 100755 (executable)
@@ -123,13 +123,13 @@ void main(int argc, char *argv[])
 #ifndef        SPRITE\r
        modexClearRegion(mv[0].page, player[0].x, player[0].y-TILEWH, 16, 32, 15);\r
 #else\r
-       PBUFSFUN(&gvar.video.page[0], player[0].x, player[0].y-TILEWH, 16, 64, 16, 32,  PCXBMPPTR);\r
+       modexDrawSpriteRegion(&gvar.video.page[0], player[0].x, player[0].y-TILEWH, 16, 64, 16, 32,     PCXBMPPTR);\r
 #endif\r
 \r
        if(!pageflipflop)       VL_ShowPage(mv[1].page, 0, 0);//modexShowPage(mv[1].page);\r
        else                    ZC_ShowMV(&mv, 0, 0);//modexShowPage(mv[0].page);//!(gvar.video.p)\r
 \r
-       modexDrawBmp(&gvar.video.page[0], 16, 16, PCXBMPPTR);\r
+       //modexDrawBmp(&gvar.video.page[0], 16, 16, PCXBMPPTR);\r
        /* buffer pages */\r
 //     modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 47);\r
 //     modexClearRegion(mv[3].page, 0, 0, mv[3].page->width, mv[3].page->height, 45);\r
@@ -219,11 +219,13 @@ void main(int argc, char *argv[])
                modexClearRegion(mv[3].page, 0, 0, 20, 36, 15);\r
                //IN_UserInput(1,1);\r
        }\r
+#ifdef SPRITE\r
        if(IN_KeyDown(66))      //f8\r
        {\r
 //             modexDrawSprite(mv[0].page, 16, 16, &p);\r
                modexDrawSprite(mv[0].page, 32+72, 16, (PCXBMPVAR));\r
        }\r
+#endif\r
        FUNCTIONKEYFUNCTIONS;\r
 \r
        //9\r
index bd0f7e7cf89e708f9cf928a022b2cef49d668d53..49d716020c3560ecffe535216b8243d561f0ebbf 100755 (executable)
 #include "src/lib/scroll16.h"\r
 #include "src/lib/bakapee.h"\r
 \r
-#define PCXBMPVAR              player[0].data\r
-#define PCXBMP                 *PCXBMPVAR\r
-#define PCXBMPPTR              PCXBMPVAR\r
-\r
 static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
 \r
 void main(int argc, char *argv[])\r
@@ -193,7 +189,6 @@ void main(int argc, char *argv[])
 //                     if(i>PAL_SIZE) i=0;\r
                }//9*/\r
                if(IN_KeyDown(25)){ modexpdump(&gvar.video.page[gvar.video.panp]); IN_UserInput(1,1); }//p\r
-               if(IN_KeyDown(sc_F8)){ modexDrawSprite(&gvar.video.page[0], 160, 120, PCXBMPPTR); IN_UserInput(1,1); }//f8\r
                //VL_ShowPage(&gvar.video.page[gvar.video.panp], 0, 0);\r
                ZC_ShowMV(&mv, 0, 0);\r
        }\r