]> 4ch.mooo.com Git - 16.git/commitdiff
moved my palette function failure to 16_vlpal.c
authorsparky4 <sparky4@cock.li>
Sat, 4 Feb 2017 19:04:37 +0000 (13:04 -0600)
committersparky4 <sparky4@cock.li>
Sat, 4 Feb 2017 19:04:37 +0000 (13:04 -0600)
16 files changed:
MEMINFO.16W [deleted file]
db.exe
makefile
src/lib/16_vl.c
src/lib/16_vl.h
src/lib/16_vlpal.c [new file with mode: 0755]
src/lib/16_vlpal.h [new file with mode: 0755]
src/lib/doslib
src/palettel.c
src/pcxtest.c
src/pcxtest2.c
src/scroll.c
src/test.c
src/vrstest.c
src/zcroll.c
wcpu.exe

diff --git a/MEMINFO.16W b/MEMINFO.16W
deleted file mode 100755 (executable)
index e69de29..0000000
diff --git a/db.exe b/db.exe
index 457a9fa192d31529e39312c63fcfc8b50357625a..af80cac81c36b2b54df02442584b23793f3cadcb 100755 (executable)
Binary files a/db.exe and b/db.exe differ
index 0aa855fb07b8a7451b8b4c96fb05105ad0feb13d..850d92edaf69dbbde2d7b270b604b8558da2dd8d 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -124,7 +124,7 @@ LIBFLAGS=$(WLIBQ) -b -n
 #
 VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(OBJ)
 OLDLIBOBJS=bitmap.$(OBJ) 16render.$(OBJ)
-GFXLIBOBJS = 16_vl.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16_vrs.$(OBJ) 16_spri.$(OBJ) $(OLDLIBOBJS)
+GFXLIBOBJS = 16_vl.$(OBJ) 16_vlpal.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16_vrs.$(OBJ) 16_spri.$(OBJ) $(OLDLIBOBJS)
 16LIBOBJS = 16_mm.$(OBJ) 16_pm.$(OBJ) 16_ca.$(OBJ) 16_tail.$(OBJ) 16_in.$(OBJ) 16_head.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_wcpu.$(OBJ) 16_timer.$(OBJ) jsmn.$(OBJ) 16_map.$(OBJ) 16text.$(OBJ) 16_enti.$(OBJ)
 DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
 !ifeq DEBUGSERIAL 1
@@ -320,7 +320,8 @@ joytest.exe:
        cd $(DOSLIB_JOYSTICK:$(to_os_path)) && $(DOSLIBMAKE) $(DOSLIB_MEMMODE) && cd $(BUILD_ROOT)
        $(COPYCOMMAND) $(DOSLIB_JOYSTICK:$(to_os_path))$(DIRSEP)$(DOSLIB_MEMMODE)$(DIRSEP)test.exe joytest.exe
 
-16_vl.$(OBJ):$(SRCLIB)/16_vl.c $(SRCLIB)/16_vl.h
+16_vl.$(OBJ):  $(SRCLIB)/16_vl.c $(SRCLIB)/16_vl.h
+16_vlpal.$(OBJ):       $(SRCLIB)/16_vlpal.c $(SRCLIB)/16_vlpal.h
 bakapee.$(OBJ):$(SRCLIB)/bakapee.c $(SRCLIB)/bakapee.h
 16render.$(OBJ):$(SRCLIB)/16render.c $(SRCLIB)/16render.h
 16planar.$(OBJ):$(MODEXLIB16)/16planar.c $(MODEXLIB16)/16planar.h
index ab9a143b045cef28e6188fde8234f4ef3763862e..a0b587236b909dcad7b9bd71de40bb3334f6916b 100755 (executable)
@@ -617,7 +617,7 @@ fadePalette(sbyte fade, sbyte start, word iter, byte *palette) {
 \r
        /* handle the case where we just update */\r
        if(iter == 0) {\r
-       modexPalUpdate1(palette);\r
+       modexPalUpdate(palette);\r
        return;\r
        }\r
 \r
@@ -630,7 +630,7 @@ fadePalette(sbyte fade, sbyte start, word iter, byte *palette) {
                tmppal[i] = 63;\r
                }\r
        }\r
-       modexPalUpdate1(tmppal);\r
+       modexPalUpdate(tmppal);\r
        iter--;\r
        dim += fade;\r
        }\r
@@ -740,177 +740,10 @@ modexPalWhite() {
 \r
 \r
 /* utility */\r
-void\r
-modexPalUpdate(bitmap_t *bmp, word *i, word qp, word aqoffset)\r
-{\r
-       byte *p = bmp->palette;\r
-       word w=0;\r
-       word q=0;\r
-       word qq=0;\r
-       static word a[PAL_SIZE];        //palette array of change values!\r
-       word z=0, aq=0, aa=0, pp=0;\r
-\r
-       //modexWaitBorder();\r
-       vga_wait_for_vsync();\r
-       if((*i)==0)\r
-       {\r
-               memset(a, -1, sizeof(a));\r
-               outp(PAL_WRITE_REG, 0);  /* start at the beginning of palette */\r
-       }\r
-       else if(qp==0)\r
-       {\r
-               q=(*i);\r
-       }\r
-       else\r
-       {\r
-               q=(*i);\r
-               qq=(*i)/3;\r
-//               printf("q: %02d\n", (q));\r
-//               printf("qq: %02d\n", (qq));\r
-               //printf("        (*i)-q=%02d\n", (*i)-q);\r
-               outp(PAL_WRITE_REG, qq);  /* start at the beginning of palette */\r
-       }\r
-       if((*i)<PAL_SIZE/2 && w==0)\r
-       {\r
-               for(; (*i)<PAL_SIZE/2; (*i)++)\r
-               {\r
-                       //if(i%3==0 && (p[i+5]==p[i+4] && p[i+4]==p[i+3] && p[i+3]==p[i+2] && p[i+2]==p[i+1] && p[i+1]==p[i] && p[i+5]==p[i]))\r
-//____           if((qp>0)&&((*i)-q)%3==0 && (p[((*i)-q)]==p[((*i)-q)+3] && p[((*i)-q)+1]==p[((*i)-q)+4] && p[((*i)-q)+2]==p[((*i)-q)+5])) outp(PAL_DATA_REG, p[(*i)-q]); else\r
-                       if(((((*i)-q)%3==0)) && (p[((*i)-q)]==p[((*i)-q)+3] && p[((*i)-q)+1]==p[((*i)-q)+4] && p[((*i)-q)+2]==p[((*i)-q)+5]))\r
-                       {\r
-                               w++;\r
-                               break;\r
-                       }\r
-                       else if(qp>0 && (*i)>=(qp) && (*i)<((qp)+3))\r
-                       {\r
-                               //printf("qp=%d\n", qp);\r
-                               //printf("                (*i)=%d a[%d]=%d\n", (*i), qp, a[qp]);\r
-                               printf("                %d's color=%d\n", (*i), (a[qp])-(bmp->offset*3)+qp);\r
-                               //outp(PAL_DATA_REG, p[((a[qp])-(bmp->offset*3)+qp)]);// fix this shit!\r
-                               if((*i)+1==(qp)+3){ w++; /*(*i)++;*/ break; }\r
-                       }\r
-                       else\r
-                       {\r
-                               if(bmp->offset==0 && (*i)<3 && q==0) outp(PAL_DATA_REG, 0);\r
-                               else\r
-                               if(qp==0) outp(PAL_DATA_REG, p[(*i)-q]);\r
-                               else{ //outp(PAL_DATA_REG, p[((*i)-(bmp->offset*3)+qp)]);\r
-                               printf("p[]=%d  qp=%d   p[]-qp=%d\n", ((*i)-(bmp->offset*3)), qp, ((*i)-(bmp->offset*3))+qp); }\r
-                       }\r
-               }\r
-               //if(qp>0) printf("qp=%d\n", qp);\r
-               //if(qp>0) printf("                                              (*i)=%d\n", (*i)/3);\r
-       }\r
-       //modexWaitBorder();      /* waits one retrace -- less flicker */\r
-       vga_wait_for_vsync();\r
-       if((*i)>=PAL_SIZE/2 && w==0)\r
-       {\r
-               for(; (*i)<PAL_SIZE; (*i)++)\r
-               {\r
-//____           if((qp>0)&&((*i)-q)%3==0 && (p[((*i)-q)]==p[((*i)-q)+3] && p[((*i)-q)+1]==p[((*i)-q)+4] && p[((*i)-q)+2]==p[((*i)-q)+5])) outp(PAL_DATA_REG, p[(*i)-q]); else\r
-                       if(((((*i)-q)%3==0)) && (p[((*i)-q)]==p[((*i)-q)+3] && p[((*i)-q)+1]==p[((*i)-q)+4] && p[((*i)-q)+2]==p[((*i)-q)+5]))\r
-                       {\r
-                               w++;\r
-                               break;\r
-                       }\r
-                       else if(qp>0 && (*i)>=(qp) && (*i)<((qp)+3))\r
-                       {\r
-                               //printf("qp=%d\n", qp);\r
-                               //printf("                (*i)=%d a[%d]=%d\n", (*i), qp, a[qp]);\r
-                               printf("                %d's color=%d\n", (*i), (a[qp]-(bmp->offset*3)+qp));\r
-                               //outp(PAL_DATA_REG, p[((a[qp])-(bmp->offset*3)+qp)]);// fix this shit!\r
-                               if((*i)+1==(qp)+3){ w++; /*(*i)++;*/ break; }\r
-                       }\r
-                       else\r
-                       {\r
-                               if(qp==0) outp(PAL_DATA_REG, p[(*i)-q]);\r
-                               else{ //outp(PAL_DATA_REG, p[((*i)-(bmp->offset*3)+qp)]);\r
-                               printf("p[]=%d  qp=%d   p[]-qp=%d\n", ((*i)-(bmp->offset*3)), qp, ((*i)-(bmp->offset*3))+qp); }\r
-                       }\r
-               }\r
-               //printf("                                                (*i)=%d\n", (*i)/3);\r
-       }\r
-\r
-printf("\nqqqqqqqq\n\n");\r
-\r
-       //palette checker~\r
-       if(q>0 && qp==0)\r
-       {\r
-               long lq;\r
-               long bufSize = (bmp->width * bmp->height);\r
-               pp = q;\r
-               //printf("1(*i)=%02d\n", (*i)/3);\r
-               //printf("1z=%02d\n", z/3);\r
-               modexchkcolor(bmp, &q, &a, &aa, &z, i);\r
-               //printf("2(*i)=%02d\n", (*i)/3);\r
-               //printf("2z=%02d\n", z/3);\r
-               aq=0;\r
-aqpee:\r
-               while(aq<=aa)\r
-               {\r
-//                       printf("a[%02d]=(%d)\n", aq, a[aq]);\r
-                       if(a[aq]==-1) aq++;\r
-                       else { aqoffset++; break; }\r
-               }\r
-//update the image data here!\r
-       for(lq=0; lq<bufSize; lq++)\r
-       {\r
-                               /*\r
-                                                                       note to self\r
-                                                                       use a[qp] instead of bmp->offset for this spot!\r
-                                                                       NO! wwww\r
-                               */\r
-\r
-                               /*\r
-                               Facking bloody point the values of the changed palette to correct values.... major confusion! wwww\r
-                               */\r
-\r
-               //(offset/bmp->offset)*bmp->offset\r
-\r
-\r
-               //printf("%02d ",bmp->data[lq]+bmp->offset);\r
-               //if(lq > 0 && lq%bmp->width==0) printf("\n");\r
-               //printf("%02d_", bmp->data[lq]+bmp->offset);\r
-               /*if(bmp->data[lq]+bmp->offset==aq)\r
-               {\r
-                       //printf("%02d", bmp->data[lq]);\r
-                       //printf("\n%02d\n", bmp->offset);\r
-                       printf("aq=%02d ", aq);\r
-                       printf("a[aq]=%02d        ", a[aq]);\r
-                       printf("a[aq]+aqpp=%02d ", a[aq]+aqpp);\r
-                       printf("a[aq]-aqpp=%02d\n", a[aq]-aqpp);\r
-                       //bmp->data[lq]=((bmp->data[lq]+bmp->offset)-a[aq]);\r
-//++++           bmp->data[lq]=a[aq]-aqpp;\r
-//                       printf("_%d ", bmp->data[lq]);\r
-                       //if(lq > 0 && lq%bmp->width==0) printf("\n");\r
-               }\r
-               else if(bmp->data[lq]+bmp->offset < ((*i)/3)-aqpp)\r
-               {\r
-                       if(bmp->data[lq]+bmp->offset >= aq)\r
-                       {\r
-                               bmp->data[lq]=(bmp->data[lq]+bmp->offset)-aqpp;//-((z-(*i))/3);\r
-                               //printf("_%d ", bmp->data[lq]+bmp->offset)-aqpp-((z-(*i))/3);\r
-                       }\r
-                       else bmp->data[lq]+=(bmp->offset-aqpp);\r
-               }*/\r
-\r
-               //printf("%02d`", bmp->data[lq]);\r
-               //if(lq > 0 && lq%bmp->width==0) printf("\n");\r
-       }\r
-\r
-//printf("               aq=%02d\n", aq);\r
-//printf("               aa=%02d\n", aa);\r
-\r
-       //update the palette~\r
-       modexPalUpdate(bmp, &pp, aq, aqoffset);\r
-       (*i)=pp;\r
-\r
-       if(aq<aa){ pp=q; aq++; goto aqpee; }\r
-       }\r
-}\r
+//moved to 16_vlpal.c\r
 \r
 void\r
-modexPalUpdate1(byte *p)\r
+modexPalUpdate(byte *p)\r
 {\r
        int i;\r
        //modexWaitBorder();\r
index de5c85769a1f04b7ada00507c09f4c3ea5b4095b..f375d1ff944d6a8c281580729a3f6165bcda9219 100755 (executable)
@@ -132,8 +132,7 @@ void modexPalBlack();
 void modexPalWhite();\r
 \r
 /* utility functions */\r
-void modexPalUpdate(bitmap_t *bmp, word *i, word qp, word aqoffset);\r
-void modexPalUpdate1(byte *p);\r
+void modexPalUpdate(byte *p);\r
 void modexPalUpdate0(byte *p);\r
 void modexPalOverscan(word col);\r
 void modexchkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, word *offset*/);\r
diff --git a/src/lib/16_vlpal.c b/src/lib/16_vlpal.c
new file mode 100755 (executable)
index 0000000..d6e92a8
--- /dev/null
@@ -0,0 +1,191 @@
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
+#include "src/lib/16_vlpal.h"\r
+\r
+void VL_palette(bitmap_t *bmp, word *i, word qp, word aqoffset)\r
+{\r
+       byte *p = bmp->palette;\r
+       word w=0;\r
+       word q=0;\r
+       word qq=0;\r
+       static word a[PAL_SIZE];        //palette array of change values!\r
+       word z=0, aq=0, aa=0, pp=0;\r
+\r
+       //modexWaitBorder();\r
+       vga_wait_for_vsync();\r
+       if((*i)==0)\r
+       {\r
+               memset(a, -1, sizeof(a));\r
+               outp(PAL_WRITE_REG, 0);  /* start at the beginning of palette */\r
+       }\r
+       else if(qp==0)\r
+       {\r
+               q=(*i);\r
+       }\r
+       else\r
+       {\r
+               q=(*i);\r
+               qq=(*i)/3;\r
+//               printf("q: %02d\n", (q));\r
+//               printf("qq: %02d\n", (qq));\r
+               //printf("        (*i)-q=%02d\n", (*i)-q);\r
+               outp(PAL_WRITE_REG, qq);  /* start at the beginning of palette */\r
+       }\r
+       if((*i)<PAL_SIZE/2 && w==0)\r
+       {\r
+               for(; (*i)<PAL_SIZE/2; (*i)++)\r
+               {\r
+                       //if(i%3==0 && (p[i+5]==p[i+4] && p[i+4]==p[i+3] && p[i+3]==p[i+2] && p[i+2]==p[i+1] && p[i+1]==p[i] && p[i+5]==p[i]))\r
+//____           if((qp>0)&&((*i)-q)%3==0 && (p[((*i)-q)]==p[((*i)-q)+3] && p[((*i)-q)+1]==p[((*i)-q)+4] && p[((*i)-q)+2]==p[((*i)-q)+5])) outp(PAL_DATA_REG, p[(*i)-q]); else\r
+                       if(((((*i)-q)%3==0)) && (p[((*i)-q)]==p[((*i)-q)+3] && p[((*i)-q)+1]==p[((*i)-q)+4] && p[((*i)-q)+2]==p[((*i)-q)+5]))\r
+                       {\r
+                               w++;\r
+                               break;\r
+                       }\r
+                       else if(qp>0 && (*i)>=(qp) && (*i)<((qp)+3))\r
+                       {\r
+                               //printf("qp=%d\n", qp);\r
+                               //printf("                (*i)=%d a[%d]=%d\n", (*i), qp, a[qp]);\r
+                               printf("                %d's color=%d\n", (*i), (a[qp])-(bmp->offset*3)+qp);\r
+                               //outp(PAL_DATA_REG, p[((a[qp])-(bmp->offset*3)+qp)]);// fix this shit!\r
+                               if((*i)+1==(qp)+3){ w++; /*(*i)++;*/ break; }\r
+                       }\r
+                       else\r
+                       {\r
+                               if(bmp->offset==0 && (*i)<3 && q==0) outp(PAL_DATA_REG, 0);\r
+                               else\r
+                               if(qp==0) outp(PAL_DATA_REG, p[(*i)-q]);\r
+                               else{ //outp(PAL_DATA_REG, p[((*i)-(bmp->offset*3)+qp)]);\r
+                               printf("p[]=%d  qp=%d   p[]-qp=%d\n", ((*i)-(bmp->offset*3)), qp, ((*i)-(bmp->offset*3))+qp); }\r
+                       }\r
+               }\r
+               //if(qp>0) printf("qp=%d\n", qp);\r
+               //if(qp>0) printf("                                              (*i)=%d\n", (*i)/3);\r
+       }\r
+       //modexWaitBorder();      /* waits one retrace -- less flicker */\r
+       vga_wait_for_vsync();\r
+       if((*i)>=PAL_SIZE/2 && w==0)\r
+       {\r
+               for(; (*i)<PAL_SIZE; (*i)++)\r
+               {\r
+//____           if((qp>0)&&((*i)-q)%3==0 && (p[((*i)-q)]==p[((*i)-q)+3] && p[((*i)-q)+1]==p[((*i)-q)+4] && p[((*i)-q)+2]==p[((*i)-q)+5])) outp(PAL_DATA_REG, p[(*i)-q]); else\r
+                       if(((((*i)-q)%3==0)) && (p[((*i)-q)]==p[((*i)-q)+3] && p[((*i)-q)+1]==p[((*i)-q)+4] && p[((*i)-q)+2]==p[((*i)-q)+5]))\r
+                       {\r
+                               w++;\r
+                               break;\r
+                       }\r
+                       else if(qp>0 && (*i)>=(qp) && (*i)<((qp)+3))\r
+                       {\r
+                               //printf("qp=%d\n", qp);\r
+                               //printf("                (*i)=%d a[%d]=%d\n", (*i), qp, a[qp]);\r
+                               printf("                %d's color=%d\n", (*i), (a[qp]-(bmp->offset*3)+qp));\r
+                               //outp(PAL_DATA_REG, p[((a[qp])-(bmp->offset*3)+qp)]);// fix this shit!\r
+                               if((*i)+1==(qp)+3){ w++; /*(*i)++;*/ break; }\r
+                       }\r
+                       else\r
+                       {\r
+                               if(qp==0) outp(PAL_DATA_REG, p[(*i)-q]);\r
+                               else{ //outp(PAL_DATA_REG, p[((*i)-(bmp->offset*3)+qp)]);\r
+                               printf("p[]=%d  qp=%d   p[]-qp=%d\n", ((*i)-(bmp->offset*3)), qp, ((*i)-(bmp->offset*3))+qp); }\r
+                       }\r
+               }\r
+               //printf("                                                (*i)=%d\n", (*i)/3);\r
+       }\r
+\r
+printf("\nqqqqqqqq\n\n");\r
+\r
+       //palette checker~\r
+       if(q>0 && qp==0)\r
+       {\r
+               long lq;\r
+               long bufSize = (bmp->width * bmp->height);\r
+               pp = q;\r
+               //printf("1(*i)=%02d\n", (*i)/3);\r
+               //printf("1z=%02d\n", z/3);\r
+               modexchkcolor(bmp, &q, &a, &aa, &z, i);\r
+               //printf("2(*i)=%02d\n", (*i)/3);\r
+               //printf("2z=%02d\n", z/3);\r
+               aq=0;\r
+aqpee:\r
+               while(aq<=aa)\r
+               {\r
+//                       printf("a[%02d]=(%d)\n", aq, a[aq]);\r
+                       if(a[aq]==-1) aq++;\r
+                       else { aqoffset++; break; }\r
+               }\r
+//update the image data here!\r
+       for(lq=0; lq<bufSize; lq++)\r
+       {\r
+                               /*\r
+                                                                       note to self\r
+                                                                       use a[qp] instead of bmp->offset for this spot!\r
+                                                                       NO! wwww\r
+                               */\r
+\r
+                               /*\r
+                               Facking bloody point the values of the changed palette to correct values.... major confusion! wwww\r
+                               */\r
+\r
+               //(offset/bmp->offset)*bmp->offset\r
+\r
+\r
+               //printf("%02d ",bmp->data[lq]+bmp->offset);\r
+               //if(lq > 0 && lq%bmp->width==0) printf("\n");\r
+               //printf("%02d_", bmp->data[lq]+bmp->offset);\r
+               /*if(bmp->data[lq]+bmp->offset==aq)\r
+               {\r
+                       //printf("%02d", bmp->data[lq]);\r
+                       //printf("\n%02d\n", bmp->offset);\r
+                       printf("aq=%02d ", aq);\r
+                       printf("a[aq]=%02d        ", a[aq]);\r
+                       printf("a[aq]+aqpp=%02d ", a[aq]+aqpp);\r
+                       printf("a[aq]-aqpp=%02d\n", a[aq]-aqpp);\r
+                       //bmp->data[lq]=((bmp->data[lq]+bmp->offset)-a[aq]);\r
+//++++           bmp->data[lq]=a[aq]-aqpp;\r
+//                       printf("_%d ", bmp->data[lq]);\r
+                       //if(lq > 0 && lq%bmp->width==0) printf("\n");\r
+               }\r
+               else if(bmp->data[lq]+bmp->offset < ((*i)/3)-aqpp)\r
+               {\r
+                       if(bmp->data[lq]+bmp->offset >= aq)\r
+                       {\r
+                               bmp->data[lq]=(bmp->data[lq]+bmp->offset)-aqpp;//-((z-(*i))/3);\r
+                               //printf("_%d ", bmp->data[lq]+bmp->offset)-aqpp-((z-(*i))/3);\r
+                       }\r
+                       else bmp->data[lq]+=(bmp->offset-aqpp);\r
+               }*/\r
+\r
+               //printf("%02d`", bmp->data[lq]);\r
+               //if(lq > 0 && lq%bmp->width==0) printf("\n");\r
+       }\r
+\r
+//printf("               aq=%02d\n", aq);\r
+//printf("               aa=%02d\n", aa);\r
+\r
+       //update the palette~\r
+       VL_palette(bmp, &pp, aq, aqoffset);\r
+       (*i)=pp;\r
+\r
+       if(aq<aa){ pp=q; aq++; goto aqpee; }\r
+       }\r
+}\r
diff --git a/src/lib/16_vlpal.h b/src/lib/16_vlpal.h
new file mode 100755 (executable)
index 0000000..63dc75d
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef __16_VLPAL_H__\r
+#define __16_VLPAL_H__\r
+\r
+#include "src/lib/16_vl.h"\r
+\r
+void VL_palette(bitmap_t *bmp, word *i, word qp, word aqoffset);\r
+\r
+#endif //__16_VLPAL_H__\r
index c3d08df66b34c30bcf2252217384a6bf9c79fd44..667d71906b174472d4a2432c5c5c0d7167187be8 160000 (submodule)
@@ -1 +1 @@
-Subproject commit c3d08df66b34c30bcf2252217384a6bf9c79fd44
+Subproject commit 667d71906b174472d4a2432c5c5c0d7167187be8
index f2ff19441c8b75b87004f86aed01cbf9048b4fdf..e7f2ace0fc3323edfe92fe0d46a260252e2f0a93 100755 (executable)
@@ -43,12 +43,12 @@ main(int argc, char *argv[])
        modexPalBlack();\r
 \r
        modexLoadPalFile(bakapee, &pal);\r
-       modexPalUpdate1(pal);\r
+       modexPalUpdate(pal);\r
        modexFadeOn(1, pal);\r
        modexpdump(&gvar.video.page[0]);\r
        getch();\r
        VGAmodeX(0, 0, &gvar);\r
-       modexPalUpdate1(pal);\r
+       modexPalUpdate(pal);\r
        /*for(i=0;i<768;i++)\r
        {\r
                printf("%02X ", pal[i]);\r
index 357e2cae3451f75c2f2d8c4e182c22019bc20dde..1360cb6d631944b09f265599b94e72009ef1da8d 100755 (executable)
@@ -74,7 +74,7 @@ void main() {
        gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]);\r
 \r
        /* fix up the palette and everything */\r
-       modexPalUpdate1(&PCXBMP->palette);\r
+       modexPalUpdate(&PCXBMP->palette);\r
 \r
        /* clear and draw one sprite and one bitmap */\r
        modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 1);\r
index efebd168dd3d20eea47466e4b17fda8d2d9aabb3..ab6e3b1e4291fb69eaf49f93ba407eaf02c8e3b0 100755 (executable)
@@ -95,7 +95,7 @@ void main() {
        gvar.video.page[0].sh+=32;\r
 \r
        /* fix up the palette and everything */\r
-       modexPalUpdate1(bmp.palette);\r
+       modexPalUpdate(bmp.palette);\r
 \r
        /* clear and draw one sprite and one bitmap */\r
        modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].sw, gvar.video.page[0].sh, 1);\r
index de0cefd2cca076f491e0bfa4be055a13e1c5ad55..6e7664f00125e87a0132b026f56ab2a9ec9ef9b7 100755 (executable)
@@ -88,9 +88,9 @@ void main(int argc, char *argv[])
 #endif\r
 #endif\r
 //++++ PCXBMPVAR.offset=(paloffset/3);\r
-//++++ modexPalUpdate1(&PCXBMPVAR, &paloffset, 0, 0);\r
-       modexPalUpdate1(&PCXBMP->palette);\r
-//++++0000             modexPalUpdate1(map.tiles->btdata->palette);\r
+//++++ modexPalUpdate(&PCXBMPVAR, &paloffset, 0, 0);\r
+       modexPalUpdate(&PCXBMP->palette);\r
+//++++0000             modexPalUpdate(map.tiles->btdata->palette);\r
        //printf("      %d\n", sizeof(ptmp->data));\r
        //printf("1:    %d\n", paloffset);\r
 //++++ map.tiles->data->offset=(paloffset/3);\r
@@ -220,7 +220,7 @@ void main(int argc, char *argv[])
 \r
        //9\r
 #ifdef FADE\r
-               if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(dpal); IN_UserInput(1,1); }\r
+               if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate(dpal); IN_UserInput(1,1); }\r
 #endif\r
                if(IN_KeyDown(sc_R)){ modexPalOverscan(rand()%56); } //r\r
 \r
index 839915fca95c245e818eb6384a30b9f67841ee24..2f4fd6b51891eb0a5f9e317d49f6cb0935be2cdb 100755 (executable)
@@ -182,7 +182,7 @@ void main(int argc, char *argv[])
                        for(i=0;i<3;i++)\r
                        {\r
                                pal2[i] = rand()%64;\r
-                               modexPalUpdate1(pal2);\r
+                               modexPalUpdate(pal2);\r
                                colo++;\r
                                if(colo>HGQ) colo=LGQ;\r
                        }\r
index d006969d69cdfc7516c8cff2ac557855492a09fb..1037b7c92c43b1be25891adc9e3f8cf00cd0b625 100755 (executable)
@@ -120,7 +120,7 @@ void main()
        t2 = (*clockw-start)/18.2;\r
 \r
        /*modexLoadPalFile("data/spri/chikyuu.pal", &pal);\r
-       modexPalUpdate1(pal);*/\r
+       modexPalUpdate(pal);*/\r
        //modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 2);\r
        VL_LoadPalFile("data/spri/chikyuu.pal", &gvar.video.palette);\r
        for (i = 0; i < 10; i++){\r
index 7d586501ce2ebf6630769e8cabe43be5e2aa3e86..c0bd1079ca92a954dd1c05ba42c81f3f146992e8 100755 (executable)
@@ -110,8 +110,7 @@ void main(int argc, char *argv[])
 \r
        /* load color palette */\r
        VL_LoadPalFile(bakapee1p, &gvar.video.palette);\r
-//     CA_LoadFile("data/spri/"BAKAPEEFILE1".pal", &pal, &gvar);\r
-//     modexPalUpdate1(pal);\r
+\r
 #ifdef FADE\r
        gpal = modexNewPal();\r
        modexPalSave(gpal);\r
@@ -202,7 +201,7 @@ void main(int argc, char *argv[])
                        VL_LoadPalFile(bakapee1p, &gvar.video.palette);\r
                }//JK\r
 #ifdef FADE\r
-               if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(dpal); IN_UserInput(1,1); }\r
+               if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate(dpal); IN_UserInput(1,1); }\r
 #endif\r
                if(IN_KeyDown(sc_R)){ modexPalOverscan(rand()%56); } //r\r
 \r
index 6a5fae4e3fd918f9bbf60ed7c83cc5b9a7215290..dc69eb74367539890f767ce8868d1d928b5bfdc5 100755 (executable)
Binary files a/wcpu.exe and b/wcpu.exe differ