]> 4ch.mooo.com Git - 16.git/commitdiff
did some cleaning~ wwww
authorsparky4 <sparky4@cock.li>
Sun, 29 Mar 2015 14:24:50 +0000 (09:24 -0500)
committersparky4 <sparky4@cock.li>
Sun, 29 Mar 2015 14:24:50 +0000 (09:24 -0500)
modified:   README
modified:   pcxtest.exe
modified:   scroll.exe
modified:   src/lib/modex16.c
modified:   src/lib/modex16.h
modified:   src/pcxtest.c
modified:   src/scroll.c
modified:   test.exe
modified:   test2.exe

README
pcxtest.exe
scroll.exe
src/lib/modex16.c
src/lib/modex16.h
src/pcxtest.c
src/scroll.c
test.exe
test2.exe

diff --git a/README b/README
index e7b058c5679bd119367a0eec758ee3ab374ed060..baa061b330f4cea0ea89e94c9c4e912a61ef4d8a 100644 (file)
--- a/README
+++ b/README
@@ -13,7 +13,7 @@ DONE 5. sprite rendering
 6. text box rendering\r
 7. text rendering\r
 DONE! YAY! 8. map loading\r
-9. map rendering~\r
+DONE! YAY! wwww 9. map rendering~\r
 10. map and item interation\r
 11. item inventory~\r
 12. Memory management (EMS + XMS)\r
index 10df3a84dc2e8694e9ddf5204a71748b167575fc..996d365e1316be70466a6a139141e4fa9a5a000a 100644 (file)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index 2a6da73cfe609a4da9e62a8446d077d5579ec1b5..69e129feba899c0d411f3e00d4dc167200d7b4cd 100644 (file)
Binary files a/scroll.exe and b/scroll.exe differ
index 83c2278827869163ee9edd97581b7cea999f9650..9d892ce22d09a9ce0e85f0018a32f0bee32a1292 100644 (file)
@@ -591,10 +591,17 @@ modexPalWhite() {
 
 /* utility */
 void
-modexPalUpdate(byte *p, word *i)
+modexPalUpdate(bitmap_t *bmp, word *i)
 {
+       byte *p = bmp->palette;
        word w=0;
        word q=0;
+       long lq;
+       long bufSize = (bmp->width * bmp->height);
+       for(lq=0; lq<bufSize; lq++)
+       {
+               bmp->data[lq]+=bmp->offset;
+       }
        modexWaitBorder();
        if((*i)==0) outp(PAL_WRITE_REG, 0);  /* start at the beginning of palette */
        else q=(*i);
index d88726243da96a7aeee4deb46c704c92f89aac40..7ded79cf8649da99f38ae29b193ac518d6d50493 100644 (file)
@@ -55,7 +55,7 @@ void modexPalBlack();
 void modexPalWhite();
 
 /* utility functions */
-void modexPalUpdate(byte *p, word *i);
+void modexPalUpdate(bitmap_t *bmp, word *i);
 void modexPalUpdate2(byte *p);
 void modexWaitBorder();
 
index 75847e5631ceff6a2a209cb5a2b1bd0e7b0d75b6..817d3695bb492cb28f59b8c8e92a8ec98a85d0f0 100644 (file)
@@ -68,7 +68,7 @@ void main() {
     modexEnter();\r
 \r
     /* fix up the palette and everything */\r
-    modexPalUpdate(bmp.palette, 0);\r
+    modexPalUpdate(&bmp, 0);\r
 \r
     /* clear and draw one sprite and one bitmap */\r
     modexClearRegion(&page, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 1);\r
index f58dbb83ac95cf16db8740c2ece22f837afb4283..8c383c0f773d7f28f404d55fad4606505cf1bba4 100644 (file)
@@ -78,7 +78,6 @@ void main() {
        long emsavail;\r
        char teststr[80];\r
        int i;
-       long lq, bufSize;
        static word paloffset=0;\r
        bitmap_t ptmp;//, npctmp; // player sprite\r
        planar_buf_t *p;\r
@@ -180,17 +179,12 @@ void main() {
        modexPalBlack();
        //ptmp.offset=(paloffset/3);
        ptmp.offset=(paloffset/3);
-       modexPalUpdate(ptmp.palette, &paloffset);
+       modexPalUpdate(&ptmp, &paloffset);
        //printf("      %d\n", sizeof(ptmp.data));
        //printf("1:    %d\n", paloffset);
        map.tiles->data->offset=(paloffset/3);
-       modexPalUpdate(map.tiles->data->palette, &paloffset);
+       modexPalUpdate(map.tiles->data, &paloffset);
        //printf("wwww: %d\n", map.tiles->data->offset);
-       bufSize = (map.tiles->data->width * map.tiles->data->height);
-       for(lq=0; lq<bufSize; lq++)
-       {
-               map.tiles->data->data[lq]+=map.tiles->data->offset;
-       }
        //printf("2:    %d\n", paloffset);
        //printf("      %d\n", sizeof(map.tiles->data->(*data)));
        gpal = modexNewPal();\r
index 9df6003d7b132c61551f2a0bce50b68bb7175f18..438dd0ead3951c42f62d10e15ea1740b259b9759 100644 (file)
Binary files a/test.exe and b/test.exe differ
index 9d517a5fab4a335ab830919aa855843923609239..cb5e880db1989b471084185dcfb3b1fb8827089d 100644 (file)
Binary files a/test2.exe and b/test2.exe differ