X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_vl.c;h=2c3fc766df37efe84f32ee076e86372e2cedf9b8;hb=a9fe632397649ac62b1d7febda9a62bc517c5c53;hp=5b73ac5c5240ea28464c74263091b0c4b2ff1e34;hpb=1af0b853a337587df021dcabc445088c78fbd703;p=16.git diff --git a/src/lib/16_vl.c b/src/lib/16_vl.c index 5b73ac5c..2c3fc766 100755 --- a/src/lib/16_vl.c +++ b/src/lib/16_vl.c @@ -879,11 +879,11 @@ void modexPalSave(byte *palette) /*byte * modexNewPal() { byte *ptr; - ptr = m a l l o c(PAL_SIZE); + ptr = mAlloc(PAL_SIZE); // handle errors if(!ptr) { - printf("Could not allocate palette.\n"); + printf("Could not Allocate palette.\n"); } return ptr; @@ -937,8 +937,8 @@ void VLL_LoadPalFilewithoffset(const char *filename, byte *palette, word o, word void VL_LoadPalFile(const char *filename, byte *palette, global_game_variables_t *gvar) { VLL_LoadPalFilewithoffset(filename, palette, - 0, -// 9, + 0, //overwrite core/system palette +// 9, //preserved core/system palette PAL_SIZE, gvar); } @@ -1135,7 +1135,7 @@ void modexprint(page_t *page, sword x, sword y, word t, boolean tlsw, word color break; case 1: if(tlsw){ x-=page->tlx; y-=page->tly; } - x_draw = x/4; + x_draw = x>>2; addrq = (page->stridew) * y + (word)(x_draw) + ((word)page->data); addrr = addrq; @@ -1264,7 +1264,7 @@ void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, c } /* palette dump on display! */ -void modexpdump(page_t *pee) +void modexpdump(nibble pagenum, global_game_variables_t *gvar) { int mult=(QUADWH); int palq=(mult)*TILEWH; @@ -1272,10 +1272,11 @@ void modexpdump(page_t *pee) int palx, paly; for(paly=TILEWH*8; palyvideo.page[pagenum], palx+TILEWH, paly+TILEWH, mult, mult, palcol); palcol++; } } + modexPalSave(gvar->video.palette); } #if 0 /////////////////////////////////////////////////////////////////////////////