From: sparky4 Date: Sun, 29 Mar 2015 14:24:50 +0000 (-0500) Subject: did some cleaning~ wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=acc96b5371d3d51633b9175609b0ce030a3d75db;p=16.git did some cleaning~ wwww 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 --- diff --git a/README b/README index e7b058c5..baa061b3 100644 --- a/README +++ b/README @@ -13,7 +13,7 @@ DONE 5. sprite rendering 6. text box rendering 7. text rendering DONE! YAY! 8. map loading -9. map rendering~ +DONE! YAY! wwww 9. map rendering~ 10. map and item interation 11. item inventory~ 12. Memory management (EMS + XMS) diff --git a/pcxtest.exe b/pcxtest.exe index 10df3a84..996d365e 100644 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/scroll.exe b/scroll.exe index 2a6da73c..69e129fe 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/modex16.c b/src/lib/modex16.c index 83c22788..9d892ce2 100644 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -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; lqdata[lq]+=bmp->offset; + } modexWaitBorder(); if((*i)==0) outp(PAL_WRITE_REG, 0); /* start at the beginning of palette */ else q=(*i); diff --git a/src/lib/modex16.h b/src/lib/modex16.h index d8872624..7ded79cf 100644 --- a/src/lib/modex16.h +++ b/src/lib/modex16.h @@ -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(); diff --git a/src/pcxtest.c b/src/pcxtest.c index 75847e56..817d3695 100644 --- a/src/pcxtest.c +++ b/src/pcxtest.c @@ -68,7 +68,7 @@ void main() { modexEnter(); /* fix up the palette and everything */ - modexPalUpdate(bmp.palette, 0); + modexPalUpdate(&bmp, 0); /* clear and draw one sprite and one bitmap */ modexClearRegion(&page, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 1); diff --git a/src/scroll.c b/src/scroll.c index f58dbb83..8c383c0f 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -78,7 +78,6 @@ void main() { long emsavail; char teststr[80]; int i; - long lq, bufSize; static word paloffset=0; bitmap_t ptmp;//, npctmp; // player sprite planar_buf_t *p; @@ -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; lqdata->data[lq]+=map.tiles->data->offset; - } //printf("2: %d\n", paloffset); //printf(" %d\n", sizeof(map.tiles->data->(*data))); gpal = modexNewPal(); diff --git a/test.exe b/test.exe index 9df6003d..438dd0ea 100644 Binary files a/test.exe and b/test.exe differ diff --git a/test2.exe b/test2.exe index 9d517a5f..cb5e880d 100644 Binary files a/test2.exe and b/test2.exe differ