]> 4ch.mooo.com Git - 16.git/commitdiff
><
authorsparky4 <sparky4@cock.li>
Thu, 29 Oct 2015 16:20:22 +0000 (11:20 -0500)
committersparky4 <sparky4@cock.li>
Thu, 29 Oct 2015 16:20:22 +0000 (11:20 -0500)
21 files changed:
16.exe
bakapi.exe
exmmtest.exe
fmemtest.exe
fontgfx.exe
fonttest.exe
inputest.exe
maptest.exe
palettec.exe
palettel.exe
pcxtest.exe
pcxtest2.exe
planrpcx.exe
scroll.exe
src/lib/16_in.h
src/lib/modex16.c
src/pcxtest.c
src/scroll.c
test.exe
test2.exe
vgmtest.exe

diff --git a/16.exe b/16.exe
index 0927fe1f56032a74e645362b68903f6c51a98d58..4539202a32e66b31f5f26fd6021125e7d50b5c1e 100755 (executable)
Binary files a/16.exe and b/16.exe differ
index 466745c883b15b6f9c11cff2420a6b32975eaac6..54433751393530912e0a555f367bd639116ef470 100755 (executable)
Binary files a/bakapi.exe and b/bakapi.exe differ
index 9c5f0558f45b80c70e96ee8817bfad65906cd231..a0b7911b10eb4ec7ce4ed37c6ecc80b6cac84d49 100755 (executable)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index d2fbb9048d51c3ef095e8226ec0636edb6169990..01aa507996dbefc7eaed0d825da715ba5965f3b0 100755 (executable)
Binary files a/fmemtest.exe and b/fmemtest.exe differ
index 49039750132426db2ec96271489150ef62884126..8e57c3f1a967b23e35ac68b021a6833bd2147bdd 100755 (executable)
Binary files a/fontgfx.exe and b/fontgfx.exe differ
index 7bf6f43c0c92e7cb366fff0623605bf063726c60..245ac55a5272926dc4152e53f754f4c92f13bd57 100755 (executable)
Binary files a/fonttest.exe and b/fonttest.exe differ
index f529b881e2e6c0d81e6b72ebf17f12253685a793..df1becf1dc4da6789d5c5633b291c82b4a7b29e3 100755 (executable)
Binary files a/inputest.exe and b/inputest.exe differ
index 76efbe5985fae9e6b30aa1742ffb8dcb6ea64fd6..30cd9163a06a8832fa08e552b6e2cf8eaa68ffee 100755 (executable)
Binary files a/maptest.exe and b/maptest.exe differ
index c1a30ac57bd891fecd4f329c4a9518362e294df7..a2b41e3c52edd9a564b7dbf0ead581a058f8570b 100755 (executable)
Binary files a/palettec.exe and b/palettec.exe differ
index 9dc86ef6fcbbbc7bf2f14c9fa492068f0c9e673d..5a0c33ccc843798a98315ddd2d859a95adbdf51f 100755 (executable)
Binary files a/palettel.exe and b/palettel.exe differ
index 01b317fed107587b276bac24fb93c0f199734b6e..096baf80b8f522ac9d051d4358500c2887925cb2 100755 (executable)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index 4e01e76c54b80996d5ede1f00a3dab4f68cebe5c..4c7ff50ad58c06a81322f6a2dd98162fbece9fe1 100755 (executable)
Binary files a/pcxtest2.exe and b/pcxtest2.exe differ
index 8a996516a1d49222e44ac4c6179b27e1400cdae9..971977648dfbb4f2db29c5cf2150aea7e71aa0f9 100755 (executable)
Binary files a/planrpcx.exe and b/planrpcx.exe differ
index 48acb9282156fda0d89ae809c184c2fa0fb8b6d6..7b6dd23b48154e738d78aaed4eedb6de4e301b2f 100755 (executable)
Binary files a/scroll.exe and b/scroll.exe differ
index 0534708c3382d2e6c4951ad6058eb107acf26608..08ce66fd0184806148f7cf1ce01af118ad696edc 100755 (executable)
@@ -31,6 +31,7 @@
 #include "src/lib/16_head.h"\r
 #include "src/lib/timer.h"\r
 #include "src/lib/bitmap.h"\r
+#include "src/lib/planar.h"\r
 \r
 #ifdef __DEBUG__\r
 //#define      __DEBUG_InputMgr__\r
@@ -222,7 +223,8 @@ typedef     struct
        word d; //direction!! wwww\r
        word q; //loop variable\r
        word speed;             //player speed!\r
-       bitmap_t data; //supposively the sprite sheet data\r
+       planar_buf_t data; //supposively the sprite sheet data\r
+//     bitmap_t data; //supposively the sprite sheet data\r
        sword hp; //hitpoints of the player\r
        int persist_aniframe;    /* gonna be increased to 1 before being used, so 0 is ok for default */\r
        CursorInfo      info;\r
index e77d5c1b7ef47c66ae85f5cc47617e7ae1070988..9b7f4c4c57c84fe1bb42002af490ac0c90ecefa6 100755 (executable)
@@ -398,47 +398,29 @@ modexClearRegion(page_t *page, int x, int y, int w, int h, byte  color) {
 //memory management needs to be added\r
 //void\r
 //modexDrawBmpRegion   (page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp)\r
-void modexDrawPBufRegion       (page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *p, boolean sprite)\r
+void modexDrawPBufRegion        (page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *p, boolean sprite)\r
 {\r
-       int plane;\r
-       int px, py, i;\r
-//     byte near *buff;\r
-       px=x;\r
-       py=y;\r
-//     buff = _nmalloc(p->pwidth+1);\r
-       // TODO Make this fast.  It's SLOOOOOOW\r
-//     for(plane=0; plane < 4; plane++) {\r
-//             i=0;\r
-//             modexSelectPlane(PLANE(plane+x));\r
-//             for(px = plane; px < p->width; px+=4) {\r
-//                     offset=px;\r
-//                     for(py=0; py<p->height/2; py++) {\r
-//                             //SELECT_ALL_PLANES();\r
-//                             if(!sprite || p->plane[offset])\r
-//                                     page->data = &(p->plane[offset][i++]);\r
-//                             offset+=p->width;\r
-//                             offset++;\r
-//                     }\r
-//             }\r
-//     }\r
-       for(plane=0; plane < 4; plane++) {\r
-               i=(rx/4)+((rx/4)*ry);\r
-               modexSelectPlane(PLANE(plane+x));\r
-               for(; y < py+p->height; y++) {\r
-                       //for(px=0; px < p->width; px++) {\r
-                               //printf("%02X ", (int) p->plane[plane][i++]);\r
-//                             _fmemcpy(buff, &(p->plane[plane][i+=p->pwidth]), p->pwidth);\r
-//                             printf("buff %u==%s\n", y, *buff);\r
-//                             _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), buff, p->pwidth);\r
-                               _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), &(p->plane[plane][i+=p->pwidth]), p->pwidth);\r
-                       //}\r
-               }\r
-               x=px;\r
-               y=py;\r
-       }\r
-//     _nfree(buff);\r
+        int plane;\r
+        int px, py, i;\r
+        px=x;\r
+        py=y;\r
+        for(plane=0; plane < 4; plane++) {\r
+                i=(rx/4)+((rx/4)*ry);\r
+                modexSelectPlane(PLANE(plane+x));\r
+                for(; y < py+rh; y++) {\r
+                        //for(px=0; px < p->width; px++) {\r
+                                //printf("%02X ", (int) p->plane[plane][i++]);\r
+//                              _fmemcpy(buff, &(p->plane[plane][i+=p->pwidth]), p->pwidth);\r
+//                              printf("buff %u==%s\n", y, *buff);\r
+                                _fmemcpy(page->data + (((page->width/4) * (y+page->dy)) + ((x+page->dx) / 4)), &(p->plane[plane][i+=rw]), rw/4);\r
+                        //}\r
+                }\r
+                x=px;\r
+                y=py;\r
+        }\r
 }\r
 \r
+\r
 /*temp*/\r
 void\r
 DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite)\r
index 7a8c3389c21e4caf37cb6e0d44a1f5dcc7c01442..f423b6a522b7042aebfb8fda2359832dfecbcdcf 100755 (executable)
 \r
 global_game_variables_t gvar;\r
 \r
-/*\r
-void\r
-DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, byte sprite)\r
-{\r
-       byte plane;\r
-       word px, py;\r
-       word offset;\r
-\r
-       // TODO Make this fast.  It's SLOOOOOOW\r
-       for(plane=0; plane < 4; plane++) {\r
-       modexSelectPlane(PLANE(plane+x));\r
-       for(px = plane; px < p->width; px+=4) {\r
-               offset=px;\r
-               for(py=0; py<p->height/2; py++) {\r
-               SELECT_ALL_PLANES();\r
-               if(!sprite || p->plane[offset])\r
-                       page->data = p->plane;\r
-               //offset+=p->width;\r
-               //offset++;\r
-               }\r
-       }\r
-       }\r
-}\r
-*/\r
-\r
 void main() {\r
        bitmap_t bmp;\r
        planar_buf_t *p;\r
index 55df4a4b40ce8481db4da50e67a7cdae18f1ef4d..1156d70f1a85bea6d5a789789cb0499c49164a0d 100755 (executable)
@@ -35,7 +35,7 @@ player_t player[MaxPlayers];
 //page_t screen, gvar.video.page[1], gvar.video.page[2];
 map_view_t mv[3];
 map_view_t *bg, *spri, *mask;//, *tmp;
-planar_buf_t *p;
+bitmap_t p;
 float t;
 sword bakapee;
 
@@ -90,11 +90,11 @@ void main(int argc, char *argv[])
        mappalptr = map.tiles->data->palette;
 
        /* data */
-       player[0].data = bitmapLoadPcx("data/ptmp.pcx"); // load sprite
+       p = bitmapLoadPcx("data/ptmp.pcx"); // load sprite
        //npctmp = bitmapLoadPcx("ptmp1.pcx"); // load sprite
 
        /* create the planar buffer */
-       p = planar_buf_from_bitmap(&player[0].data);
+       (player[0].data) = *planar_buf_from_bitmap(&p);
 //0000 printf("planar buffer ok\n");
 #endif
        /*      input!  */
@@ -187,7 +187,7 @@ void main(int argc, char *argv[])
        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);
+       //oldDrawBmp(VGA, player[0].x-4, player[0].y-TILEWH, &player[0].data, 1);
 #else
        modexDrawSpriteRegion(spri->page, player[0].x-4, player[0].y-TILEWH, 24, 64, 24, 32, &player[0].data);
 #endif
index 18b670ef36499a607197c09b08fe7282c4039c92..e7c3fc1894c1e98dd0b8cef5021319dcf55fadb4 100755 (executable)
Binary files a/test.exe and b/test.exe differ
index 7bb49f12f582ff6f0b5fd9f1d055a5fe9b664d15..5e68112e946a63d9a7a04cdab0938b3e75a5966e 100755 (executable)
Binary files a/test2.exe and b/test2.exe differ
index f0bd57fe2b907ea1cf5068ee28e87c583c1b10f0..f822b1ef93bb838b5fb3442607ba22ebee5394f1 100755 (executable)
Binary files a/vgmtest.exe and b/vgmtest.exe differ