From: sparky4 Date: Fri, 10 Feb 2017 15:18:21 +0000 (-0600) Subject: cannot think on the pal maker X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=8564174b559b9e19036392ab7677fe9ee754080c;p=16.git cannot think on the pal maker --- diff --git a/TEST.L16 b/TEST.L16 new file mode 100755 index 00000000..c0b07783 --- /dev/null +++ b/TEST.L16 @@ -0,0 +1,19 @@ + +qqqqqqqq + +Project 16 test.exe. This is just a test file! +version Feb 10 2017 09:14:32 +VL_PrintmodexmemInfo: + Virtual Screen: 352x272 Tile: 22x17=((Virtual Screen)/16) + Screen: 320x240 Tile: 20x15=((Screen)/16) + Free Video Memory: 767 + page [0]=(a000:0000) size=23936 w=352 h=272 sw=320 sh=240 pi=1408 + [1]=(a000:5d80) size=23936 w=352 h=272 sw=320 sh=240 pi=1408 + [2]=(a000:bb00) size=8448 w=352 h=96 sw=352 sh=96 pi=1408 + [3]=(a000:dc00) size=8448 w=352 h=96 sw=352 sh=96 pi=1408 +tx=1 ty=1 player.d=2 + +==== +0 paloffset= 8 +==== + diff --git a/data/16.pal b/data/16.pal new file mode 100755 index 00000000..eaf52085 Binary files /dev/null and b/data/16.pal differ diff --git a/data/G.PAL b/data/G.PAL index 906897bc..8092380a 100755 Binary files a/data/G.PAL and b/data/G.PAL differ diff --git a/data/chikyuu.pcx b/data/chikyuu.pcx index a8520208..049e4bcf 100755 Binary files a/data/chikyuu.pcx and b/data/chikyuu.pcx differ diff --git a/data/spri/CHUBACW0.VRL b/data/spri/CHUBACW0.VRL index 1034a61d..cd190106 100755 Binary files a/data/spri/CHUBACW0.VRL and b/data/spri/CHUBACW0.VRL differ diff --git a/data/spri/CHUBACW1.VRL b/data/spri/CHUBACW1.VRL index aaa6ca5e..8aeb64e7 100755 Binary files a/data/spri/CHUBACW1.VRL and b/data/spri/CHUBACW1.VRL differ diff --git a/data/spri/CHUBACW2.VRL b/data/spri/CHUBACW2.VRL index 171c45c3..bb81e153 100755 Binary files a/data/spri/CHUBACW2.VRL and b/data/spri/CHUBACW2.VRL differ diff --git a/data/spri/CHUBFCW0.VRL b/data/spri/CHUBFCW0.VRL index cfc4f795..75d5a6e4 100755 Binary files a/data/spri/CHUBFCW0.VRL and b/data/spri/CHUBFCW0.VRL differ diff --git a/data/spri/CHUBFCW1.VRL b/data/spri/CHUBFCW1.VRL index f6424ede..7a08464e 100755 Binary files a/data/spri/CHUBFCW1.VRL and b/data/spri/CHUBFCW1.VRL differ diff --git a/data/spri/CHUBFCW2.VRL b/data/spri/CHUBFCW2.VRL index 2b7ce708..8e26123e 100755 Binary files a/data/spri/CHUBFCW2.VRL and b/data/spri/CHUBFCW2.VRL differ diff --git a/data/spri/CHUBLCW0.VRL b/data/spri/CHUBLCW0.VRL index 0a10d098..46ef3241 100755 Binary files a/data/spri/CHUBLCW0.VRL and b/data/spri/CHUBLCW0.VRL differ diff --git a/data/spri/CHUBLCW1.VRL b/data/spri/CHUBLCW1.VRL index d8cb40da..ab84f0de 100755 Binary files a/data/spri/CHUBLCW1.VRL and b/data/spri/CHUBLCW1.VRL differ diff --git a/data/spri/CHUBLCW2.VRL b/data/spri/CHUBLCW2.VRL index 7d92a3da..7b791e8a 100755 Binary files a/data/spri/CHUBLCW2.VRL and b/data/spri/CHUBLCW2.VRL differ diff --git a/data/spri/CHUBRCW0.VRL b/data/spri/CHUBRCW0.VRL index 85d95653..b61e6747 100755 Binary files a/data/spri/CHUBRCW0.VRL and b/data/spri/CHUBRCW0.VRL differ diff --git a/data/spri/CHUBRCW1.VRL b/data/spri/CHUBRCW1.VRL index 11ad4c94..2f3cb346 100755 Binary files a/data/spri/CHUBRCW1.VRL and b/data/spri/CHUBRCW1.VRL differ diff --git a/data/spri/CHUBRCW2.VRL b/data/spri/CHUBRCW2.VRL index 0c46190a..6d37b7ab 100755 Binary files a/data/spri/CHUBRCW2.VRL and b/data/spri/CHUBRCW2.VRL differ diff --git a/data/spri/chikyuu.pal b/data/spri/chikyuu.pal index 0aa359d3..1fc14ee7 100755 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 index e640b6cc..00000000 Binary files a/data/spri/chikyuu.vrl and /dev/null differ diff --git a/data/spri/chikyuu.vrs b/data/spri/chikyuu.vrs index abcaf75b..3bf084e9 100755 Binary files a/data/spri/chikyuu.vrs and b/data/spri/chikyuu.vrs differ diff --git a/src/lib/16_vl.c b/src/lib/16_vl.c index 0da3771b..13d8c9bb 100755 --- a/src/lib/16_vl.c +++ b/src/lib/16_vl.c @@ -784,96 +784,6 @@ modexPalOverscan(word col) outp(PAL_DATA_REG, col); } -//color checker~ -//i want to make another vesion that checks the palette when the palette is being appened~ -void modexchkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, word *offset*/) -{ - byte *pal; - word zz=0; - pal = modexNewPal(); - modexPalSave(pal); - //printf("q: %02d\n", (*q)); - printf("chkcolor start~\n"); - printf("1 (*z): %d\n", (*z)/3); - printf("1 (*i): %d\n", (*i)/3); -// printf("1 offset of color in palette (*q): %d\n", (*q)/3); - printf("wwwwwwwwwwwwwwww\n"); - //check palette for dups - for(; (*z)data; diff --git a/src/lib/16_vl.h b/src/lib/16_vl.h index f375d1ff..49457d2b 100755 --- a/src/lib/16_vl.h +++ b/src/lib/16_vl.h @@ -135,7 +135,6 @@ void modexPalWhite(); void modexPalUpdate(byte *p); void modexPalUpdate0(byte *p); void modexPalOverscan(word col); -void modexchkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, word *offset*/); void modexputPixel(page_t *page, int x, int y, byte color); byte modexgetPixel(page_t *page, int x, int y); diff --git a/src/lib/16_vlpal.c b/src/lib/16_vlpal.c index d6e92a8c..ab0464ca 100755 --- a/src/lib/16_vlpal.c +++ b/src/lib/16_vlpal.c @@ -22,9 +22,100 @@ #include "src/lib/16_vlpal.h" -void VL_palette(bitmap_t *bmp, word *i, word qp, word aqoffset) +//color checker~ +//i want to make another vesion that checks the palette when the palette is being appened~ +void modexchkcolor(imgtestpal_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, word *offset*/) { - byte *p = bmp->palette; + byte *pal; + word zz=0; + pal = modexNewPal(); + modexPalSave(pal); + //printf("q: %02d\n", (*q)); + printf("chkcolor start~\n"); + printf("1 (*z): %d\n", (*z)/3); + printf("1 (*i): %d\n", (*i)/3); +// printf("1 offset of color in palette (*q): %d\n", (*q)/3); + printf("wwwwwwwwwwwwwwww\n"); + //check palette for dups + for(; (*z)palette; word w=0; word q=0; word qq=0; @@ -183,7 +274,7 @@ aqpee: //printf(" aa=%02d\n", aa); //update the palette~ - VL_palette(bmp, &pp, aq, aqoffset); + VL_palette(bmp, p, &pp, aq, aqoffset); (*i)=pp; if(aqdx); modexp /* the position within the map array */ i=ty * mv->map->width + tx; for( mv->dx=poopoffset; mv->dx<(mv->page->sw+mv->dxThresh)/(poopoffset+1) && tx < mv->map->width; mv->dx+=mv->map->tiles->tileWidth, tx++) { - if(i>=0) /* we are in the map, so copy away! */ + if(i>=0) mapDrawTile(mv->map->tiles, mv->map->data[i], mv->page, mv->dx, y); i++; /* next! */ } -//if(pagedelayrendermap) delay(200); +if(pagedelayrendermap) delay(200); } void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *player, word poopoffset) @@ -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, i + 1 row above and one below */ for( mv->dy=poopoffset; mv->dy<(mv->page->sh+mv->dyThresh)/(poopoffset+1) && ty < mv->map->height; mv->dy+=mv->map->tiles->tileHeight, ty++) { - if(i>=0) /* we are in the map, so copy away! */ + if(i>=0) mapDrawTile(mv->map->tiles, mv->map->data[i], mv->page, x, mv->dy); i += mv->map->width; } -//if(pagedelayrendermap) delay(200); +if(pagedelayrendermap) delay(200); } void mapDrawWRow(map_view_t *mv, int tx, int ty, word y) diff --git a/src/test.c b/src/test.c index 2f4fd6b5..e5d503de 100755 --- a/src/test.c +++ b/src/test.c @@ -22,6 +22,7 @@ #include #include "src/lib/16_vl.h" +#include "src/lib/16_vlpal.h" #include "src/lib/16_in.h" #include "src/lib/scroll16.h" @@ -32,6 +33,7 @@ static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ void main(int argc, char *argv[]) { + static word paloffset=0; static global_game_variables_t gvar; static player_t player[MaxPlayers]; @@ -41,6 +43,10 @@ void main(int argc, char *argv[]) int i, j; word startclk, endclk; word k; + + imgtestpal_t bmp1, bmp2; + bmp1.width=bmp2.width= 40; + bmp1.width=bmp2.height= 30; //====byte *pal, *pal2; //====word colo=LGQ; @@ -89,6 +95,9 @@ void main(int argc, char *argv[]) //====modexPalBlack(); /* load our palette */ + VL_LoadPalFile("data/16.pal", &gvar.video.palette); + bmp1.offset=(paloffset/3); + VL_palette(&bmp1, &gvar.video.palette, &paloffset, 0, 0); //====modexLoadPalFile("data/default.pal", &pal2); /* overscan show */ @@ -111,13 +120,13 @@ void main(int argc, char *argv[]) modexShowPage(&gvar.video.page[0]);*/ - modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 15); - modexClearRegion(&gvar.video.page[0], 16, 16, gvar.video.page[0].sw, gvar.video.page[0].sh, 128); - modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 42); - modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 128); + modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 1); + modexClearRegion(&gvar.video.page[0], 16, 16, gvar.video.page[0].sw, gvar.video.page[0].sh, 2); + modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 3); + modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 2); modexCopyPageRegion(&gvar.video.page[1], &gvar.video.page[0], 0, 0, 0, 0, gvar.video.page[0].width, gvar.video.page[0].height); - modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 47); - modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 45); + modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 4); + modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 6); /* fade in */ @@ -204,6 +213,9 @@ void main(int argc, char *argv[]) printf("version %s\n", VERSION); VL_PrintmodexmemInfo(&gvar.video); 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); + printf("\n====\n"); + printf("0 paloffset= %d\n", paloffset/3); + printf("====\n\n"); //IN_Shutdown(); //====modexPalBlack(); //====modexFadeOn(1, pal);