]> 4ch.mooo.com Git - 16.git/commitdiff
cannot think on the pal maker
authorsparky4 <sparky4@cock.li>
Fri, 10 Feb 2017 15:18:21 +0000 (09:18 -0600)
committersparky4 <sparky4@cock.li>
Fri, 10 Feb 2017 15:18:21 +0000 (09:18 -0600)
26 files changed:
TEST.L16 [new file with mode: 0755]
data/16.pal [new file with mode: 0755]
data/G.PAL
data/chikyuu.pcx
data/spri/CHUBACW0.VRL
data/spri/CHUBACW1.VRL
data/spri/CHUBACW2.VRL
data/spri/CHUBFCW0.VRL
data/spri/CHUBFCW1.VRL
data/spri/CHUBFCW2.VRL
data/spri/CHUBLCW0.VRL
data/spri/CHUBLCW1.VRL
data/spri/CHUBLCW2.VRL
data/spri/CHUBRCW0.VRL
data/spri/CHUBRCW1.VRL
data/spri/CHUBRCW2.VRL
data/spri/chikyuu.pal
data/spri/chikyuu.vrl [deleted file]
data/spri/chikyuu.vrs
src/lib/16_vl.c
src/lib/16_vl.h
src/lib/16_vlpal.c
src/lib/16_vlpal.h
src/lib/doslib
src/lib/scroll16.c
src/test.c

diff --git a/TEST.L16 b/TEST.L16
new file mode 100755 (executable)
index 0000000..c0b0778
--- /dev/null
+++ b/TEST.L16
@@ -0,0 +1,19 @@
+\r
+qqqqqqqq\r
+\r
+Project 16 test.exe. This is just a test file!\r
+version Feb 10 2017 09:14:32\r
+VL_PrintmodexmemInfo:\r
+  Virtual Screen: 352x272      Tile: 22x17=((Virtual Screen)/16)\r
+         Screen: 320x240       Tile: 20x15=((Screen)/16)\r
+  Free Video Memory: 767\r
+  page [0]=(a000:0000) size=23936      w=352  h=272 sw=320  sh=240 pi=1408\r
+       [1]=(a000:5d80) size=23936      w=352  h=272 sw=320  sh=240 pi=1408\r
+       [2]=(a000:bb00) size=8448       w=352  h=96  sw=352  sh=96  pi=1408\r
+       [3]=(a000:dc00) size=8448       w=352  h=96  sw=352  sh=96  pi=1408\r
+tx=1   ty=1    player.d=2\r
+\r
+====\r
+0      paloffset=      8\r
+====\r
+\r
diff --git a/data/16.pal b/data/16.pal
new file mode 100755 (executable)
index 0000000..eaf5208
Binary files /dev/null and b/data/16.pal differ
index 906897bc70e146ee900bce31986fb34212d9f138..8092380af954e11b165eae773d83f03429619756 100755 (executable)
Binary files a/data/G.PAL and b/data/G.PAL differ
index a85202089e8b741952baac00ddf9445da998ebc3..049e4bcf4e5f61efac597d73a37738b5324f1764 100755 (executable)
Binary files a/data/chikyuu.pcx and b/data/chikyuu.pcx differ
index 1034a61dc4a22d6862d5c0e686c6cf1ef88f72ca..cd1901060e481df955fbb2f086284eede5d3d4d5 100755 (executable)
Binary files a/data/spri/CHUBACW0.VRL and b/data/spri/CHUBACW0.VRL differ
index aaa6ca5e911d4e6363dae831c7d95bc02935ac11..8aeb64e77e8657ebc96a1a5fb87aaa86f7d5d147 100755 (executable)
Binary files a/data/spri/CHUBACW1.VRL and b/data/spri/CHUBACW1.VRL differ
index 171c45c34e379e154e8bf1fbe5d2ceb049447afc..bb81e15323f5418c32ade7240e483bdbf23f432b 100755 (executable)
Binary files a/data/spri/CHUBACW2.VRL and b/data/spri/CHUBACW2.VRL differ
index cfc4f79554e1c9393c107f9fd23196dc1a609241..75d5a6e46e90a41bbe26dff7c9165d175947ab34 100755 (executable)
Binary files a/data/spri/CHUBFCW0.VRL and b/data/spri/CHUBFCW0.VRL differ
index f6424ede55bf1bb01be4008120c8ccaa0c1f2cf2..7a08464e1584dc4cd5888cea20f0402687cef1e8 100755 (executable)
Binary files a/data/spri/CHUBFCW1.VRL and b/data/spri/CHUBFCW1.VRL differ
index 2b7ce708b88efa53df83f4a24e737bb752e4e5b4..8e26123eab58856677d3aa114d1f53da12b93e6a 100755 (executable)
Binary files a/data/spri/CHUBFCW2.VRL and b/data/spri/CHUBFCW2.VRL differ
index 0a10d098a360c1b040198d2b8f57db21d6850414..46ef32415f475260b1715488bcbbb79c6bf152f2 100755 (executable)
Binary files a/data/spri/CHUBLCW0.VRL and b/data/spri/CHUBLCW0.VRL differ
index d8cb40da2c30a021e90cd3f90302dd312021d82a..ab84f0de462376054f241960feba9d831a96e4ba 100755 (executable)
Binary files a/data/spri/CHUBLCW1.VRL and b/data/spri/CHUBLCW1.VRL differ
index 7d92a3da006f052a6f327cd65284afc6975dead9..7b791e8a2af97e9849ef3e4cb9f4675f66ccb2e1 100755 (executable)
Binary files a/data/spri/CHUBLCW2.VRL and b/data/spri/CHUBLCW2.VRL differ
index 85d9565326ea9907b3c483336eb95374994eda8f..b61e67477fa9e810e7d36f7195b15c2c57024139 100755 (executable)
Binary files a/data/spri/CHUBRCW0.VRL and b/data/spri/CHUBRCW0.VRL differ
index 11ad4c94e61a9fca13559928bcd71713d53ec3bc..2f3cb346632328f98bb297e199066bfd2a2d4ef9 100755 (executable)
Binary files a/data/spri/CHUBRCW1.VRL and b/data/spri/CHUBRCW1.VRL differ
index 0c46190a94600a4ec463dfd4ae909095fef8b30d..6d37b7ab84511d625708d8a7d86d31c1ac03ac0b 100755 (executable)
Binary files a/data/spri/CHUBRCW2.VRL and b/data/spri/CHUBRCW2.VRL differ
index 0aa359d3a09d5f588bd1f1f50305a9ab670682e4..1fc14ee725663e77af99c1239d8ca9f9efdf30b4 100755 (executable)
Binary files a/data/spri/chikyuu.pal and b/data/spri/chikyuu.pal differ
diff --git a/data/spri/chikyuu.vrl b/data/spri/chikyuu.vrl
deleted file mode 100755 (executable)
index e640b6c..0000000
Binary files a/data/spri/chikyuu.vrl and /dev/null differ
index abcaf75b4785eb26163ce3eb5b68b5b1e1ecad1f..3bf084e9ff3199c4c14020ded8efe183f27b51e4 100755 (executable)
Binary files a/data/spri/chikyuu.vrs and b/data/spri/chikyuu.vrs differ
index 0da3771bd8e48e739b048bf0ca67e9e5c41bdfc3..13d8c9bb28e0b5c641505d155d80a638c6a8060c 100755 (executable)
@@ -784,96 +784,6 @@ modexPalOverscan(word col)
        outp(PAL_DATA_REG, col);\r
 }\r
 \r
-//color checker~\r
-//i want to make another vesion that checks the palette when the palette is being appened~\r
-void modexchkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, word *offset*/)\r
-{\r
-               byte *pal;\r
-               word zz=0;\r
-               pal = modexNewPal();\r
-               modexPalSave(pal);\r
-               //printf("q: %02d\n", (*q));\r
-               printf("chkcolor start~\n");\r
-               printf("1                                  (*z): %d\n", (*z)/3);\r
-               printf("1                                  (*i): %d\n", (*i)/3);\r
-//               printf("1 offset of color in palette  (*q): %d\n", (*q)/3);\r
-               printf("wwwwwwwwwwwwwwww\n");\r
-               //check palette for dups\r
-               for(; (*z)<PAL_SIZE; (*z)+=3)\r
-               {\r
-                       //printf("\n            z: %d\n", (*z));\r
-                       //printf("                q: %d\n", (*q));\r
-                       //printf("                z+q: %d\n\n", ((*z)+(*q)));\r
-                       //if((*z)%3==0)\r
-                       //{\r
-//----                   if(pal[(*z)]==pal[(*z)+3] && pal[(*z)+1]==pal[(*z)+4] && pal[(*z)+2]==pal[(*z)+5])\r
-                               if((*z)==(*i))\r
-                               {\r
-//                                       printf("\n%d  [%02d][%02d][%02d]\n", (*z), pal[(*z)], pal[(*z)+1], pal[(*z)+2]);\r
-//                                       printf("%d      [%02d][%02d][%02d]\n\n", (*z)+3, pal[(*z)+3], pal[(*z)+4], pal[(*z)+5]);\r
-//0000                           (*z)-=3;\r
-                                       break;\r
-                               }\r
-                               else for(zz=0; zz<(*q); zz+=3)\r
-                               {\r
-                                       //printf("zz: %02d\n", zz/3);\r
-                                       if(zz%3==0)\r
-                                       {\r
-                                               if(pal[((*z)+(*q))]==pal[((*z)+(*q))+3] && pal[((*z)+(*q))+1]==pal[((*z)+(*q))+4] && pal[((*z)+(*q))+2]==pal[((*z)+(*q))+5])    //break if duplicate colors found in palette because it have reached the end of the current data of the palette\r
-                                               {\r
-//                                                       (*z)-=3;\r
-//                                                       (*i)-=3;\r
-//                                                       printf("\nzq1:%d[%02d][%02d][%02d]\n", (zz+q), pal[(zz+q)], pal[(zz+q)+1], pal[(zz+q)+2]);\r
-//                                                       printf("zq2:%d[%02d][%02d][%02d]\n\n", (zz+q)+3, pal[(zz+q)+3], pal[(zz+q)+4], pal[(zz+q)+5]);\r
-                                                       break;\r
-                                               }\r
-                                               else if(pal[zz]==pal[((*z)+(*q))] && pal[zz+1]==pal[((*z)+(*q))+1] && pal[zz+2]==pal[((*z)+(*q))+2])\r
-                                               {\r
-//                                                       printf("\n\nwwwwwwwwwwwwwwww\n");\r
-//                                                       printf("      zq: %d  [%02d][%02d][%02d] value that is needing to be changed~\n", ((*z)+(*q))/3, pal[((*z)+(*q))], pal[((*z)+(*q))+1], pal[((*z)+(*q))+2]);\r
-//                                                       printf("      zz: %d  [%02d][%02d][%02d] value that the previous value is going to change to~\n", (zz)/3, pal[zz], pal[zz+1], pal[zz+2]);\r
-//                                                       //printf("      zv: %d  [%02d][%02d][%02d] wwww\n", (zz-z+q)/3, pal[(zz-z+q)], pal[(zz-z+q)+1], pal[(zz-z+q)+2]);\r
-//                                                       printf("      z : %d  [%02d][%02d][%02d] offset value~\n", (*z)/3, pal[(*z)], pal[(*z)+1], pal[(*z)+2]);\r
-//++++                                           (*i)--;\r
-//                                                       (*z)--;\r
-                                                       //expand dong here\r
-/*\r
-planned features that i plan to implement~\r
-image that has values on the pallete list!\r
-wwww\r
-no... wait.... no wwww\r
-*/\r
-                                                       //for(zzii=0; zzii<3; zzii++)\r
-                                                       //{\r
-                                                               //printf("z+q: %d\n\n", ((*z)+(*q)));\r
-                                                               a[(((*z)+(*q)))]=zz;\r
-                                                       //}\r
-                                                       (*aa)=(((*z)+(*q)));\r
-                                                       printf("!!                                        a[%02d]: %d\n", (((*z)+(*q))/3), zz/3);\r
-//                                                       printf("\n              aa: %d\n\n", (*aa));\r
-//                                                       printf("      a[%02d]=(%02d) offset array i think the palette should be updated again~\n", ((*z)+(*q))/3, a[((*z)+(*q))/3]);\r
-//                                                       printf("wwwwwwwwwwwwwwww\n\n");\r
-                                               }\r
-                                               /*else\r
-                                               {\r
-                                                       printf("================\n");\r
-                                                       printf("zq: %d  [%02d][%02d][%02d]\n", ((*z)+(*q))/3, pal[((*z)+(*q))], pal[((*z)+(*q))+1], pal[((*z)+(*q))+2]);\r
-                                                       printf("zz: %d  [%02d][%02d][%02d]\n", (zz)/3, pal[zz], pal[zz+1], pal[zz+2]);\r
-                                                       printf("z : %d  [%02d][%02d][%02d]\n", (*z)/3, pal[(*z)], pal[(*z)+1], pal[(*z)+2]);\r
-                                                       printf("================\n");\r
-                                               }*/\r
-                                               //printf("[%d]", (zz+q));\r
-                                       }\r
-                               }\r
-               }\r
-               printf("wwwwwwwwwwwwwwww\n");\r
-               printf("2                                  (*z): %d\n", (*z)/3);\r
-               printf("2                                  (*i): %d\n", (*i)/3);\r
-//               printf("2 offset of color in palette  (*q): %d\n", (*q)/3);\r
-               printf("chkcolor end~\n");\r
-               free(pal);\r
-}\r
-\r
 void modexputPixel(page_t *page, int x, int y, byte color)\r
 {\r
        word pageOff = (word) page->data;\r
index f375d1ff944d6a8c281580729a3f6165bcda9219..49457d2b696278e4567a24c292dfdf5505ba9c04 100755 (executable)
@@ -135,7 +135,6 @@ void modexPalWhite();
 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
 void modexputPixel(page_t *page, int x, int y, byte color);\r
 byte modexgetPixel(page_t *page, int x, int y);\r
 \r
index d6e92a8c5dc423d43b894d0b7d039b30cd5dc27e..ab0464ca7eacb3be91ebb9ac40be9310cba83a73 100755 (executable)
 \r
 #include "src/lib/16_vlpal.h"\r
 \r
-void VL_palette(bitmap_t *bmp, word *i, word qp, word aqoffset)\r
+//color checker~\r
+//i want to make another vesion that checks the palette when the palette is being appened~\r
+void modexchkcolor(imgtestpal_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, word *offset*/)\r
 {\r
-       byte *p = bmp->palette;\r
+               byte *pal;\r
+               word zz=0;\r
+               pal = modexNewPal();\r
+               modexPalSave(pal);\r
+               //printf("q: %02d\n", (*q));\r
+               printf("chkcolor start~\n");\r
+               printf("1                                  (*z): %d\n", (*z)/3);\r
+               printf("1                                  (*i): %d\n", (*i)/3);\r
+//               printf("1 offset of color in palette  (*q): %d\n", (*q)/3);\r
+               printf("wwwwwwwwwwwwwwww\n");\r
+               //check palette for dups\r
+               for(; (*z)<PAL_SIZE; (*z)+=3)\r
+               {\r
+                       //printf("\n            z: %d\n", (*z));\r
+                       //printf("                q: %d\n", (*q));\r
+                       //printf("                z+q: %d\n\n", ((*z)+(*q)));\r
+                       //if((*z)%3==0)\r
+                       //{\r
+//----                   if(pal[(*z)]==pal[(*z)+3] && pal[(*z)+1]==pal[(*z)+4] && pal[(*z)+2]==pal[(*z)+5])\r
+                               if((*z)==(*i))\r
+                               {\r
+//                                       printf("\n%d  [%02d][%02d][%02d]\n", (*z), pal[(*z)], pal[(*z)+1], pal[(*z)+2]);\r
+//                                       printf("%d      [%02d][%02d][%02d]\n\n", (*z)+3, pal[(*z)+3], pal[(*z)+4], pal[(*z)+5]);\r
+//0000                           (*z)-=3;\r
+                                       break;\r
+                               }\r
+                               else for(zz=0; zz<(*q); zz+=3)\r
+                               {\r
+                                       //printf("zz: %02d\n", zz/3);\r
+                                       if(zz%3==0)\r
+                                       {\r
+                                               if(pal[((*z)+(*q))]==pal[((*z)+(*q))+3] && pal[((*z)+(*q))+1]==pal[((*z)+(*q))+4] && pal[((*z)+(*q))+2]==pal[((*z)+(*q))+5])    //break if duplicate colors found in palette because it have reached the end of the current data of the palette\r
+                                               {\r
+//                                                       (*z)-=3;\r
+//                                                       (*i)-=3;\r
+//                                                       printf("\nzq1:%d[%02d][%02d][%02d]\n", (zz+q), pal[(zz+q)], pal[(zz+q)+1], pal[(zz+q)+2]);\r
+//                                                       printf("zq2:%d[%02d][%02d][%02d]\n\n", (zz+q)+3, pal[(zz+q)+3], pal[(zz+q)+4], pal[(zz+q)+5]);\r
+                                                       break;\r
+                                               }\r
+                                               else if(pal[zz]==pal[((*z)+(*q))] && pal[zz+1]==pal[((*z)+(*q))+1] && pal[zz+2]==pal[((*z)+(*q))+2])\r
+                                               {\r
+//                                                       printf("\n\nwwwwwwwwwwwwwwww\n");\r
+//                                                       printf("      zq: %d  [%02d][%02d][%02d] value that is needing to be changed~\n", ((*z)+(*q))/3, pal[((*z)+(*q))], pal[((*z)+(*q))+1], pal[((*z)+(*q))+2]);\r
+//                                                       printf("      zz: %d  [%02d][%02d][%02d] value that the previous value is going to change to~\n", (zz)/3, pal[zz], pal[zz+1], pal[zz+2]);\r
+//                                                       //printf("      zv: %d  [%02d][%02d][%02d] wwww\n", (zz-z+q)/3, pal[(zz-z+q)], pal[(zz-z+q)+1], pal[(zz-z+q)+2]);\r
+//                                                       printf("      z : %d  [%02d][%02d][%02d] offset value~\n", (*z)/3, pal[(*z)], pal[(*z)+1], pal[(*z)+2]);\r
+//++++                                           (*i)--;\r
+//                                                       (*z)--;\r
+                                                       //expand dong here\r
+/*\r
+planned features that i plan to implement~\r
+image that has values on the pallete list!\r
+wwww\r
+no... wait.... no wwww\r
+*/\r
+                                                       //for(zzii=0; zzii<3; zzii++)\r
+                                                       //{\r
+                                                               //printf("z+q: %d\n\n", ((*z)+(*q)));\r
+                                                               a[(((*z)+(*q)))]=zz;\r
+                                                       //}\r
+                                                       (*aa)=(((*z)+(*q)));\r
+                                                       printf("!!                                        a[%02d]: %d\n", (((*z)+(*q))/3), zz/3);\r
+//                                                       printf("\n              aa: %d\n\n", (*aa));\r
+//                                                       printf("      a[%02d]=(%02d) offset array i think the palette should be updated again~\n", ((*z)+(*q))/3, a[((*z)+(*q))/3]);\r
+//                                                       printf("wwwwwwwwwwwwwwww\n\n");\r
+                                               }\r
+                                               /*else\r
+                                               {\r
+                                                       printf("================\n");\r
+                                                       printf("zq: %d  [%02d][%02d][%02d]\n", ((*z)+(*q))/3, pal[((*z)+(*q))], pal[((*z)+(*q))+1], pal[((*z)+(*q))+2]);\r
+                                                       printf("zz: %d  [%02d][%02d][%02d]\n", (zz)/3, pal[zz], pal[zz+1], pal[zz+2]);\r
+                                                       printf("z : %d  [%02d][%02d][%02d]\n", (*z)/3, pal[(*z)], pal[(*z)+1], pal[(*z)+2]);\r
+                                                       printf("================\n");\r
+                                               }*/\r
+                                               //printf("[%d]", (zz+q));\r
+                                       }\r
+                               }\r
+               }\r
+               printf("wwwwwwwwwwwwwwww\n");\r
+               printf("2                                  (*z): %d\n", (*z)/3);\r
+               printf("2                                  (*i): %d\n", (*i)/3);\r
+//               printf("2 offset of color in palette  (*q): %d\n", (*q)/3);\r
+               printf("chkcolor end~\n");\r
+               free(pal);\r
+}\r
+\r
+void\r
+VL_palette(imgtestpal_t *bmp, byte *p, 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
@@ -183,7 +274,7 @@ aqpee:
 //printf("               aa=%02d\n", aa);\r
 \r
        //update the palette~\r
-       VL_palette(bmp, &pp, aq, aqoffset);\r
+       VL_palette(bmp, p, &pp, aq, aqoffset);\r
        (*i)=pp;\r
 \r
        if(aq<aa){ pp=q; aq++; goto aqpee; }\r
index 63dc75d1e21e1835bcd1be5e14781c817030acc2..91d99384915077e86c0099e0a0d05ebf3528514e 100755 (executable)
@@ -3,6 +3,15 @@
 \r
 #include "src/lib/16_vl.h"\r
 \r
-void VL_palette(bitmap_t *bmp, word *i, word qp, word aqoffset);\r
+#define BEVERBOSEPALCHECK\r
+\r
+typedef struct\r
+{\r
+       word width;\r
+       word height;\r
+       word offset;\r
+} imgtestpal_t;\r
+\r
+void VL_palette(imgtestpal_t *bmp, byte *p, word *i, word qp, word aqoffset);\r
 \r
 #endif //__16_VLPAL_H__\r
index 9fa1754125e085f823438c4ac18378b385a5dd0c..a4ede8f20a10d3406aa898874b672960e4bb202e 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 9fa1754125e085f823438c4ac18378b385a5dd0c
+Subproject commit a4ede8f20a10d3406aa898874b672960e4bb202e
index a5b453a1d5e4454fab586911e7e2be92dd59e106..65f2f5e737a1e6e09f50aece76c2f658259fa66e 100755 (executable)
@@ -612,11 +612,11 @@ if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv->dx); modexp
        /* the position within the map array */\r
        i=ty * mv->map->width + tx;\r
        for(    mv->dx=poopoffset;      mv->dx<(mv->page->sw+mv->dxThresh)/(poopoffset+1) && tx < mv->map->width;       mv->dx+=mv->map->tiles->tileWidth, tx++) {\r
-               if(i>=0)        /* we are in the map, so copy away! */\r
+               if(i>=0)\r
                        mapDrawTile(mv->map->tiles, mv->map->data[i], mv->page, mv->dx, y);\r
                i++; /* next! */\r
        }\r
-//if(pagedelayrendermap) delay(200);\r
+if(pagedelayrendermap) delay(200);\r
 }\r
 \r
 void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *player, word poopoffset)\r
@@ -631,11 +631,11 @@ if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv->dy); modexp
        /* We'll copy all of the columns in the screen,\r
           i + 1 row above and one below */\r
        for(    mv->dy=poopoffset;      mv->dy<(mv->page->sh+mv->dyThresh)/(poopoffset+1) && ty < mv->map->height;      mv->dy+=mv->map->tiles->tileHeight, ty++) {\r
-               if(i>=0)        /* we are in the map, so copy away! */\r
+               if(i>=0)\r
                        mapDrawTile(mv->map->tiles, mv->map->data[i], mv->page, x, mv->dy);\r
                i += mv->map->width;\r
        }\r
-//if(pagedelayrendermap) delay(200);\r
+if(pagedelayrendermap) delay(200);\r
 }\r
 \r
 void mapDrawWRow(map_view_t *mv, int tx, int ty, word y)\r
index 2f4fd6b51891eb0a5f9e317d49f6cb0935be2cdb..e5d503de02a651856ca6bd6c5478af400053b0f5 100755 (executable)
@@ -22,6 +22,7 @@
 \r
 #include <stdio.h>\r
 #include "src/lib/16_vl.h"\r
+#include "src/lib/16_vlpal.h"\r
 #include "src/lib/16_in.h"\r
 #include "src/lib/scroll16.h"\r
 \r
@@ -32,6 +33,7 @@ static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */
 \r
 void main(int argc, char *argv[])\r
 {\r
+       static word paloffset=0;\r
        static global_game_variables_t gvar;\r
        static player_t player[MaxPlayers];\r
 \r
@@ -41,6 +43,10 @@ void main(int argc, char *argv[])
        int i, j;\r
        word startclk, endclk;\r
        word k;\r
+\r
+       imgtestpal_t bmp1, bmp2;\r
+       bmp1.width=bmp2.width=  40;\r
+       bmp1.width=bmp2.height= 30;\r
        //====byte *pal, *pal2;\r
 \r
        //====word colo=LGQ;\r
@@ -89,6 +95,9 @@ void main(int argc, char *argv[])
        //====modexPalBlack();\r
 \r
        /* load our palette */\r
+       VL_LoadPalFile("data/16.pal", &gvar.video.palette);\r
+       bmp1.offset=(paloffset/3);\r
+       VL_palette(&bmp1, &gvar.video.palette, &paloffset, 0, 0);\r
        //====modexLoadPalFile("data/default.pal", &pal2);\r
 \r
        /* overscan show */\r
@@ -111,13 +120,13 @@ void main(int argc, char *argv[])
        modexShowPage(&gvar.video.page[0]);*/\r
 \r
 \r
-       modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 15);\r
-       modexClearRegion(&gvar.video.page[0], 16, 16, gvar.video.page[0].sw, gvar.video.page[0].sh, 128);\r
-       modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 42);\r
-       modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 128);\r
+       modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 1);\r
+       modexClearRegion(&gvar.video.page[0], 16, 16, gvar.video.page[0].sw, gvar.video.page[0].sh, 2);\r
+       modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 3);\r
+       modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 2);\r
        modexCopyPageRegion(&gvar.video.page[1], &gvar.video.page[0], 0, 0, 0, 0, gvar.video.page[0].width, gvar.video.page[0].height);\r
-       modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 47);\r
-       modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 45);\r
+       modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 4);\r
+       modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 6);\r
 \r
 \r
        /* fade in */\r
@@ -204,6 +213,9 @@ void main(int argc, char *argv[])
        printf("version %s\n", VERSION);\r
        VL_PrintmodexmemInfo(&gvar.video);\r
        printf("tx=%d   ", mv[gvar.video.sp].tx); printf("ty=%d ", mv[gvar.video.sp].ty); printf("player.d=%d\n", player[0].enti.d);\r
+       printf("\n====\n");\r
+       printf("0       paloffset=      %d\n", paloffset/3);\r
+       printf("====\n\n");\r
        //IN_Shutdown();\r
        //====modexPalBlack();\r
        //====modexFadeOn(1, pal);\r