From: sparky4 Date: Fri, 16 Dec 2016 16:24:59 +0000 (-0600) Subject: trying to figure out the issue with player sprite with pcx i have no idea wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=5847e594212977917e1f8ce6330bd35ae9c45213;p=16.git trying to figure out the issue with player sprite with pcx i have no idea wwww --- diff --git a/.gitignore b/.gitignore index 911e8919..15ee4357 100755 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ TODO~ LICENCE~ *.mah *.MAH +__wcl__.lnk !bcexmm.map !makefile !modex.lib diff --git a/DEBUG.16W b/DEBUG.16W index 56e1b237..607a5fc0 100755 --- a/DEBUG.16W +++ b/DEBUG.16W @@ -1,210 +1,210 @@ -Seg:0 Size:10340 Owner:0x0 -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 -Seg:294f Size:37 Owner:0x0 -+ -Seg:2974 Size:256 Owner:0x1650 +Seg:0 Size:12150 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 +Seg:3061 Size:37 Owner:0x0 +++ +Seg:3086 Size:256 Owner:0x1650 ++++ -Seg:2a74 Size:256 Owner:0x1442 +Seg:3186 Size:256 Owner:0x1442 +++++ +Seg:3286 Size:256 Owner:0x1444 +++++ +Seg:3386 Size:256 Owner:0x1446 +++++ -Seg:2b74 Size:256 Owner:0x1444 +Seg:3486 Size:256 Owner:0x1448 ++++ -Seg:2c74 Size:256 Owner:0x1446 +Seg:3586 Size:256 Owner:0x144a ++++ -Seg:2d74 Size:256 Owner:0x1448 +Seg:3686 Size:256 Owner:0x144c ++++ -Seg:2e74 Size:256 Owner:0x144a +Seg:3786 Size:256 Owner:0x144e ++++ -Seg:2f74 Size:256 Owner:0x144c +Seg:3886 Size:256 Owner:0x1450 +++++ -Seg:3074 Size:256 Owner:0x144e +Seg:3986 Size:256 Owner:0x1452 ++++ -Seg:3174 Size:256 Owner:0x1450 +Seg:3a86 Size:256 Owner:0x1454 ++++ -Seg:3274 Size:256 Owner:0x1452 +Seg:3b86 Size:256 Owner:0x1456 ++++ -Seg:3374 Size:256 Owner:0x1454 +Seg:3c86 Size:256 Owner:0x1458 ++++ -Seg:3474 Size:256 Owner:0x1456 +Seg:3d86 Size:256 Owner:0x145a +++++ -Seg:3574 Size:256 Owner:0x1458 +Seg:3e86 Size:256 Owner:0x145c ++++ -Seg:3674 Size:256 Owner:0x145a +Seg:3f86 Size:256 Owner:0x145e ++++ -Seg:3774 Size:256 Owner:0x145c +Seg:4086 Size:256 Owner:0x1460 ++++ -Seg:3874 Size:256 Owner:0x145e +Seg:4186 Size:256 Owner:0x1462 ++++ -Seg:3974 Size:256 Owner:0x1460 +Seg:4286 Size:256 Owner:0x1464 +++++ -Seg:3a74 Size:256 Owner:0x1462 +Seg:4386 Size:256 Owner:0x1466 ++++ -Seg:3b74 Size:256 Owner:0x1464 +Seg:4486 Size:256 Owner:0x1468 ++++ -Seg:3c74 Size:256 Owner:0x1466 +Seg:4586 Size:256 Owner:0x146a ++++ -Seg:3d74 Size:256 Owner:0x1468 +Seg:4686 Size:256 Owner:0x146c ++++ -Seg:3e74 Size:256 Owner:0x146a +Seg:4786 Size:256 Owner:0x146e +++++ -Seg:3f74 Size:256 Owner:0x146c +Seg:4886 Size:256 Owner:0x1470 ++++ -Seg:4074 Size:256 Owner:0x146e +Seg:4986 Size:256 Owner:0x1472 ++++ -Seg:4174 Size:256 Owner:0x1470 +Seg:4a86 Size:256 Owner:0x1474 ++++ -Seg:4274 Size:256 Owner:0x1472 +Seg:4b86 Size:256 Owner:0x1476 ++++ -Seg:4374 Size:256 Owner:0x1474 +Seg:4c86 Size:256 Owner:0x1478 +++++ -Seg:4474 Size:256 Owner:0x1476 +Seg:4d86 Size:256 Owner:0x147a ++++ -Seg:4574 Size:256 Owner:0x1478 +Seg:4e86 Size:256 Owner:0x147c ++++ -Seg:4674 Size:256 Owner:0x147a +Seg:4f86 Size:256 Owner:0x147e ++++ -Seg:4774 Size:256 Owner:0x147c +Seg:5086 Size:256 Owner:0x1480 ++++ -Seg:4874 Size:256 Owner:0x147e +Seg:5186 Size:256 Owner:0x1482 +++++ -Seg:4974 Size:256 Owner:0x1480 +Seg:5286 Size:256 Owner:0x1484 ++++ -Seg:4a74 Size:256 Owner:0x1482 +Seg:5386 Size:256 Owner:0x1486 ++++ -Seg:4b74 Size:256 Owner:0x1484 +Seg:5486 Size:256 Owner:0x1488 ++++ -Seg:4c74 Size:256 Owner:0x1486 +Seg:5586 Size:256 Owner:0x148a ++++ -Seg:4d74 Size:256 Owner:0x1488 +Seg:5686 Size:256 Owner:0x148c +++++ -Seg:4e74 Size:256 Owner:0x148a +Seg:5786 Size:256 Owner:0x148e ++++ -Seg:4f74 Size:256 Owner:0x148c +Seg:5886 Size:256 Owner:0x1490 ++++ -Seg:5074 Size:256 Owner:0x148e +Seg:5986 Size:256 Owner:0x1492 ++++ -Seg:5174 Size:256 Owner:0x1490 +Seg:5a86 Size:256 Owner:0x1494 ++++ -Seg:5274 Size:256 Owner:0x1492 +Seg:5b86 Size:256 Owner:0x1496 +++++ -Seg:5374 Size:256 Owner:0x1494 +Seg:5c86 Size:256 Owner:0x1498 ++++ -Seg:5474 Size:256 Owner:0x1496 +Seg:5d86 Size:256 Owner:0x149a ++++ -Seg:5574 Size:256 Owner:0x1498 +Seg:5e86 Size:256 Owner:0x149c ++++ -Seg:5674 Size:256 Owner:0x149a +Seg:5f86 Size:256 Owner:0x149e ++++ -Seg:5774 Size:256 Owner:0x149c +Seg:6086 Size:256 Owner:0x14a0 +++++ -Seg:5874 Size:256 Owner:0x149e +Seg:6186 Size:256 Owner:0x14a2 ++++ -Seg:5974 Size:256 Owner:0x14a0 +Seg:6286 Size:256 Owner:0x14a4 ++++ -Seg:5a74 Size:256 Owner:0x14a2 +Seg:6386 Size:256 Owner:0x14a6 ++++ -Seg:5b74 Size:256 Owner:0x14a4 +Seg:6486 Size:256 Owner:0x14a8 ++++ -Seg:5c74 Size:256 Owner:0x14a6 +Seg:6586 Size:256 Owner:0x14aa +++++ -Seg:5d74 Size:256 Owner:0x14a8 +Seg:6686 Size:256 Owner:0x14ac ++++ -Seg:5e74 Size:256 Owner:0x14aa +Seg:6786 Size:256 Owner:0x14ae ++++ -Seg:5f74 Size:256 Owner:0x14ac +Seg:6886 Size:256 Owner:0x14b0 ++++ -Seg:6074 Size:256 Owner:0x14ae +Seg:6986 Size:256 Owner:0x14b2 ++++ -Seg:6174 Size:256 Owner:0x14b0 +Seg:6a86 Size:256 Owner:0x14b4 +++++ -Seg:6274 Size:256 Owner:0x14b2 +Seg:6b86 Size:256 Owner:0x14b6 ++++ -Seg:6374 Size:256 Owner:0x14b4 +Seg:6c86 Size:256 Owner:0x14b8 ++++ -Seg:6474 Size:256 Owner:0x14b6 +Seg:6d86 Size:256 Owner:0x14ba ++++ -Seg:6574 Size:256 Owner:0x14b8 +Seg:6e86 Size:256 Owner:0x14bc ++++ -Seg:6674 Size:256 Owner:0x14ba +Seg:6f86 Size:256 Owner:0x14be +++++ -Seg:6774 Size:256 Owner:0x14bc +Seg:7086 Size:256 Owner:0x14c0 ++++ -Seg:6874 Size:256 Owner:0x14be +Seg:7186 Size:256 Owner:0x14c2 ++++ -Seg:6974 Size:256 Owner:0x14c0 +Seg:7286 Size:256 Owner:0x14c4 ++++ -Seg:6a74 Size:256 Owner:0x14c2 +Seg:7386 Size:256 Owner:0x14c6 ++++ -Seg:6b74 Size:256 Owner:0x14c4 +Seg:7486 Size:256 Owner:0x14c8 +++++ -Seg:6c74 Size:256 Owner:0x14c6 +Seg:7586 Size:256 Owner:0x14ca ++++ -Seg:6d74 Size:256 Owner:0x14c8 +Seg:7686 Size:256 Owner:0x14cc ++++ -Seg:6e74 Size:256 Owner:0x14ca +Seg:7786 Size:256 Owner:0x14ce ++++ -Seg:6f74 Size:256 Owner:0x14cc +Seg:7886 Size:256 Owner:0x14d0 ++++ -Seg:7074 Size:256 Owner:0x14ce +Seg:7986 Size:256 Owner:0x14d2 +++++ -Seg:7174 Size:256 Owner:0x14d0 +Seg:7a86 Size:256 Owner:0x14d4 ++++ -Seg:7274 Size:256 Owner:0x14d2 +Seg:7b86 Size:256 Owner:0x14d6 ++++ -Seg:7374 Size:256 Owner:0x14d4 +Seg:7c86 Size:256 Owner:0x14d8 ++++ -Seg:7474 Size:256 Owner:0x14d6 +Seg:7d86 Size:256 Owner:0x14da ++++ -Seg:7574 Size:256 Owner:0x14d8 +Seg:7e86 Size:256 Owner:0x14dc +++++ -Seg:7674 Size:256 Owner:0x14da +Seg:7f86 Size:256 Owner:0x14de ++++ -Seg:7774 Size:256 Owner:0x14dc +Seg:8086 Size:256 Owner:0x14e0 ++++ -Seg:7874 Size:256 Owner:0x14de +Seg:8186 Size:256 Owner:0x14e2 ++++ -Seg:7974 Size:256 Owner:0x14e0 +Seg:8286 Size:256 Owner:0x14e4 ++++ -Seg:7a74 Size:256 Owner:0x14e2 +Seg:8386 Size:256 Owner:0x14e6 +++++ -Seg:7b74 Size:256 Owner:0x14e4 +Seg:8486 Size:256 Owner:0x14e8 ++++ -Seg:7c74 Size:256 Owner:0x14e6 +Seg:8586 Size:256 Owner:0x14ea ++++ -Seg:7d74 Size:256 Owner:0x14e8 +Seg:8686 Size:256 Owner:0x14ec ++++ -Seg:7e74 Size:256 Owner:0x14ea +Seg:8786 Size:256 Owner:0x14ee ++++ -Seg:7f74 Size:256 Owner:0x14ec +Seg:8886 Size:256 Owner:0x14f0 +++++ -Seg:8074 Size:256 Owner:0x14ee +Seg:8986 Size:256 Owner:0x14f2 ++++ -Seg:8174 Size:256 Owner:0x14f0 +Seg:8a86 Size:256 Owner:0x14f4 ++++ -Seg:8274 Size:256 Owner:0x14f2 +Seg:8b86 Size:256 Owner:0x14f6 ++++ -Seg:8374 Size:256 Owner:0x14f4 +Seg:8c86 Size:256 Owner:0x14f8 ++++ -Seg:8474 Size:256 Owner:0x14f6 +Seg:8d86 Size:256 Owner:0x14fa +++++ -Seg:8574 Size:256 Owner:0x14f8 +Seg:8e86 Size:256 Owner:0x14fc ++++ -Seg:8674 Size:256 Owner:0x14fa +Seg:8f86 Size:256 Owner:0x14fe ++++ -Seg:8774 Size:256 Owner:0x14fc +Seg:9086 Size:256 Owner:0x1500 ++++ -Seg:8874 Size:256 Owner:0x14fe +Seg:9186 Size:256 Owner:0x1502 ++++ -Seg:8974 Size:256 Owner:0x1500 +Seg:9286 Size:256 Owner:0x1504 +++++ -Seg:8a74 Size:256 Owner:0x1502 -++++ -Seg:8b74 Size:256 Owner:0x1504 -++++ -Seg:8c74 Size:256 Owner:0x1506 +Seg:9386 Size:256 Owner:0x1506 ++++ -Seg:8d74 Size:256 Owner:0x1508 +Seg:9486 Size:256 Owner:0x1508 ++++ -Seg:8e74 Size:401 Owner:0xec10 +Seg:9586 Size:401 Owner:0xec14 ++++++ -Seg:b974 Size:18059 Owner:0x0 -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file +Seg:c086 Size:16249 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W index 16af83b8..e333a77e 100755 --- a/HEAP.16W +++ b/HEAP.16W @@ -1,59 +1,59 @@ == default == - FREE block at 29720016 of size 18 - USED block at 29720028 of size 50 - USED block at 2972005a of size 50 - USED block at 2972008c of size 50 - USED block at 297200be of size 50 - USED block at 297200f0 of size 50 - USED block at 29720122 of size 50 - USED block at 29720154 of size 50 - USED block at 29720186 of size 50 - USED block at 297201b8 of size 50 - USED block at 297201ea of size 50 - USED block at 2972021c of size 50 - USED block at 2972024e of size 50 - USED block at 29720280 of size 50 - FREE block at 297202b2 of size 14 - USED block at 297202c0 of size 20 - USED block at 297202d4 of size 136 - FREE block at 2972035c of size 7328 + FREE block at 30840016 of size 18 + USED block at 30840028 of size 50 + USED block at 3084005a of size 50 + USED block at 3084008c of size 50 + USED block at 308400be of size 50 + USED block at 308400f0 of size 50 + USED block at 30840122 of size 50 + USED block at 30840154 of size 50 + USED block at 30840186 of size 50 + USED block at 308401b8 of size 50 + USED block at 308401ea of size 50 + USED block at 3084021c of size 50 + USED block at 3084024e of size 50 + USED block at 30840280 of size 50 + FREE block at 308402b2 of size 14 + USED block at 308402c0 of size 20 + USED block at 308402d4 of size 136 + FREE block at 3084035c of size 7328 OK - end of heap == near == - USED block at 1971ec66 of size 12 - USED block at 1971ec72 of size 528 - USED block at 1971ee82 of size 72 - USED block at 1971eeca of size 20 - USED block at 1971eede of size 20 - USED block at 1971eef2 of size 20 - USED block at 1971ef06 of size 20 - USED block at 1971ef1a of size 20 - USED block at 1971ef2e of size 4302 + USED block at 2083ec66 of size 12 + USED block at 2083ec72 of size 528 + USED block at 2083ee82 of size 72 + USED block at 2083eeca of size 20 + USED block at 2083eede of size 20 + USED block at 2083eef2 of size 20 + USED block at 2083ef06 of size 20 + USED block at 2083ef1a of size 20 + USED block at 2083ef2e of size 4302 OK - end of heap == far == - USED block at 29720016 of size 18 - USED block at 29720028 of size 50 - USED block at 2972005a of size 50 - USED block at 2972008c of size 50 - USED block at 297200be of size 50 - USED block at 297200f0 of size 50 - USED block at 29720122 of size 50 - USED block at 29720154 of size 50 - USED block at 29720186 of size 50 - USED block at 297201b8 of size 50 - USED block at 297201ea of size 50 - USED block at 2972021c of size 50 - USED block at 2972024e of size 50 - USED block at 29720280 of size 50 - USED block at 297202b2 of size 14 - USED block at 297202c0 of size 20 - USED block at 297202d4 of size 136 - USED block at 2972035c of size 7328 + USED block at 30840016 of size 18 + USED block at 30840028 of size 50 + USED block at 3084005a of size 50 + USED block at 3084008c of size 50 + USED block at 308400be of size 50 + USED block at 308400f0 of size 50 + USED block at 30840122 of size 50 + USED block at 30840154 of size 50 + USED block at 30840186 of size 50 + USED block at 308401b8 of size 50 + USED block at 308401ea of size 50 + USED block at 3084021c of size 50 + USED block at 3084024e of size 50 + USED block at 30840280 of size 50 + USED block at 308402b2 of size 14 + USED block at 308402c0 of size 20 + USED block at 308402d4 of size 136 + USED block at 3084035c of size 7328 OK - end of heap Memory Type Total Used Free @@ -63,9 +63,9 @@ Near 5014 712 4302 Far 8166 806 7360 ---------------- -------- -------- -------- coreleft = 4300 -farcoreleft = 27888 -GetFreeSize = 23610 +farcoreleft = 60698 +GetFreeSize = 56420 GetNearFreeSize = 4302 -GetFarFreeSize = 23610 +GetFarFreeSize = 56420 memavl = 4300 -stackavail = 31527 +stackavail = 31515 diff --git a/MMDUMP.16W b/MMDUMP.16W index ca7b1727..68b42b31 100755 Binary files a/MMDUMP.16W and b/MMDUMP.16W differ diff --git a/db.exe b/db.exe new file mode 100755 index 00000000..5616e4ae Binary files /dev/null and b/db.exe differ diff --git a/makefile b/makefile index 2f4b6e4e..ab1dc97b 100755 --- a/makefile +++ b/makefile @@ -173,11 +173,11 @@ TESTEXEC2 = & test.exe & test0.exe & pcxtest.exe & - pcxtest2.exe + pcxtest2.exe & + db.exe UTILEXEC = & palettel.exe & - palettec.exe & - db.exe + palettec.exe EXEC = & 16.exe & bakapi.exe & @@ -212,7 +212,7 @@ fonttest.exe: fonttest.$(OBJ) gfx.lib fontgfx.exe: fontgfx.$(OBJ) gfx.lib $(DOSLIBLIBS) inputest.exe: inputest.$(OBJ) $(16LIB) $(DOSLIBLIBS) #sountest.exe: sountest.$(OBJ) $(16LIB) -pcxtest.exe: pcxtest.$(OBJ) gfx.lib $(DOSLIBLIBS) +pcxtest.exe: pcxtest.$(OBJ) gfx.lib $(DOSLIBLIBS) $(16LIB)##++++ vrstest.exe: vrstest.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS) #vgacamm.exe: vgacamm.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS) palettec.exe: palettec.$(OBJ) gfx.lib $(DOSLIBLIBS) @@ -255,7 +255,7 @@ inputest.$(OBJ):$(SRC)/inputest.c #tsthimem.$(OBJ): $(SRC)/tsthimem.c exmmtest.$(OBJ):$(SRC)/exmmtest.c vgmtest.$(OBJ):$(SRC)/vgmtest.c -db.$(OBJ):$(SRC)/db.c +db.$(OBJ):$(SRC)/util/db.c # # non executable objects libraries diff --git a/pcxtest.exe b/pcxtest.exe index 94d4b68a..80e12ed7 100755 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/src/fonttest.c b/src/fonttest.c index 6ecbdfbd..ffa6d0c7 100755 --- a/src/fonttest.c +++ b/src/fonttest.c @@ -21,8 +21,8 @@ */ #include #include -#include "lib/16_t.h" -#include "lib/16text.h" +#include "src/lib/16_t.h" +#include "src/lib/16text.h" void main(int argc, char near *argv[]) { diff --git a/src/lib/16_in.h b/src/lib/16_in.h index e0efe8cf..67a98f61 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -227,7 +227,7 @@ typedef struct memptr gr; entity_t *ent; #endif - bitmap_t __far *data; //supposively the sprite sheet data//old format + bitmap_t *data; //supposively the sprite sheet data//old format sword hp; //hitpoints of the player int persist_aniframe; /* gonna be increased to 1 before being used, so 0 is ok for default */ CursorInfo info; diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index b160ac65..d070bd07 100755 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -39,8 +39,8 @@ #define FREEBLOCK(x) {*x->useptr=NULL;x->next=gvar->mm.mmfree;gvar->mm.mmfree=x;} -#define SAVENEARHEAP 0x200 // space to leave in data segment -#define SAVEFARHEAP 0//x400 // space to leave in far heap +#define SAVENEARHEAP 0x2400 // space to leave in data segment200 +#define SAVEFARHEAP 0x2400 // space to leave in far heap400 #define BUFFERSIZE 0x1000 // miscelanious, allways available buffer diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index b030b379..6d7f72ed 100755 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -24,6 +24,9 @@ #include #include #include "src/lib/bitmap.h" +#include "src/lib/16_mm.h" +#include "src/lib/16_pm.h" +#include "src/lib/16_ca.h" static struct pcxHeader { byte id; @@ -91,7 +94,7 @@ static void loadPcxPalette(FILE *file, bitmap_t *result) { bitmap_t -bitmapLoadPcx(char *filename) { +bitmapLoadPcx(char *filename, global_game_variables_t *gv) { FILE *file; bitmap_t result; dword bufSize; @@ -111,7 +114,9 @@ bitmapLoadPcx(char *filename) { /* allocate the buffer */ //printf("%zu\n", _memmax()); bufSize = (/*(dword)*/result.width * result.height); - result.data = _fmalloc(bufSize); + //CA_LoadFile(filename, (memptr *)(result.data), gv); + result.data = malloc(bufSize); + // result.data = (byte far *)_fmalloc(bufSize); // result.data = (byte __huge *)halloc(bufSize, sizeof(byte)); /*printf("&bufSize=%p\n", &bufSize); @@ -121,7 +126,6 @@ bitmapLoadPcx(char *filename) { printf("Size of result.width is %zu \n", result.width); printf("Size of result.height is %zu \n", result.height); printf("Dimensions of result is %lu\n", (dword)result.width*result.height);*/ - //exit(0); if(!result.data) { fprintf(stderr, "Could not allocate memory for bitmap data."); fclose(file); diff --git a/src/lib/bitmap.h b/src/lib/bitmap.h index 6ef0af71..25537645 100755 --- a/src/lib/bitmap.h +++ b/src/lib/bitmap.h @@ -28,6 +28,6 @@ #include "src/lib/16_vl.h" -bitmap_t bitmapLoadPcx(char *filename); +bitmap_t bitmapLoadPcx(char *filename, global_game_variables_t *gv); tileset_t bitmapLoadPcxTiles(char *filename, word twidth, word theight); #endif diff --git a/src/pcxtest.c b/src/pcxtest.c index 5325303c..1f366fed 100755 --- a/src/pcxtest.c +++ b/src/pcxtest.c @@ -25,7 +25,7 @@ #include #include "src/lib/16_vl.h" #include "src/lib/bitmap.h" -//----#include "src/lib/planar.h" +#include "src/lib/16render.h" static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ @@ -33,9 +33,7 @@ void main() { static global_game_variables_t gvar; bitmap_t bmp; //---- planar_buf_t *p; - int i; word start; - int plane; float t1, t2; // DOSLIB: check our environment @@ -60,7 +58,7 @@ void main() { } //0000 bmp = bitmapLoadPcx("data/koishi~~.pcx"); - bmp = bitmapLoadPcx("data/chikyuu.pcx"); + bmp = bitmapLoadPcx("data/chikyuu.pcx", &gvar); // bmp = bitmapLoadPcx("data/koishi^^.pcx"); // bmp = bitmapLoadPcx("16/PCX_LIB/chikyuu.pcx"); //---- p = planar_buf_from_bitmap(&bmp); diff --git a/src/pcxtest2.c b/src/pcxtest2.c index c65f4e94..2ab48632 100755 --- a/src/pcxtest2.c +++ b/src/pcxtest2.c @@ -85,7 +85,7 @@ void main() { } //0000 bmp = bitmapLoadPcx("data/koishi~~.pcx"); - bmp = bitmapLoadPcx("data/chikyuu.pcx"); + bmp = bitmapLoadPcx("data/chikyuu.pcx", &gvar); // bmp = bitmapLoadPcx("data/koishi^^.pcx"); // bmp = bitmapLoadPcx("16/PCX_LIB/chikyuu.pcx"); //---- p = planar_buf_from_bitmap(&bmp); diff --git a/src/scroll.c b/src/scroll.c index 716c7dcf..00c672ca 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -28,8 +28,7 @@ //#define FADE #define MODEX //this is for mode x initiating -//word far *clock= (word far*) 0x046C; /* 18.2hz clock */ -//bitmap_t *p; +//bitmap_t p; static map_t map; player_t player[MaxPlayers]; map_view_t mv[4]; @@ -77,8 +76,8 @@ void main(int argc, char *argv[]) //mappalptr = map.tiles->btdata->palette; /* data */ - //player[0].data = _fmalloc(48*128); //TODO use exmm - *player[0].data = bitmapLoadPcx("data/chikyuu.pcx"); // load sprite + player[0].data = malloc(72*128); //TODO use exmm + *player[0].data = bitmapLoadPcx("data/chikyuu.pcx", &gvar); // load sprite /* create the planar buffer */ ////++++ (player[0].data) = *planar_buf_from_bitmap(&p); @@ -218,7 +217,6 @@ void main(int argc, char *argv[]) #ifdef MODEX #ifdef FADE if(IN_KeyDown(24)){ modexPalUpdate0(gpal); paloffset=0; modexpdump(mv[0].page); modexpdump(mv[1].page); IN_UserInput(1,1); } //p - if(IN_KeyDown(23)){ modexDrawSprite(mv[1].page, 160, 120, player[0].data); IN_UserInput(1,1); } //o if(IN_KeyDown(22)){ paloffset=0; modexPalBlack(); modexPalUpdate(player[0].data, &paloffset, 0, 0); printf("1paloffset = %d\n", paloffset/3); @@ -258,8 +256,8 @@ void main(int argc, char *argv[]) } if(IN_KeyDown(66)) //f8 { -// modexDrawSprite(mv[0].page, 16, 16, p); - modexDrawSprite(mv[0].page, 32+48, 16, (player[0].data)); +// modexDrawSprite(mv[0].page, 16, 16, &p); + modexDrawSprite(mv[0].page, 32+72, 16, (player[0].data)); } //TODO fmemtest into page /*if(IN_KeyDown(4+1)) //4 diff --git a/src/db.c b/src/util/db.c similarity index 100% rename from src/db.c rename to src/util/db.c diff --git a/src/zcroll.c b/src/zcroll.c index 97b45e60..90c72add 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -28,7 +28,7 @@ #define MODEXZ -//TODO: known issues the array dependent mv stuff and player arrays +//bitmap_t p; static map_t map; player_t player[MaxPlayers]; map_view_t mv[4]; @@ -76,8 +76,8 @@ void main(int argc, char *argv[]) // data read_vrs(&gvar, "data/spri/chikyuu.vrs", player[0].ent->spri->spritesheet); - player[0].data = malloc(48*128); //TODO use exmm - *player[0].data = bitmapLoadPcx("data/chikyuu.pcx"); // load sprite + player[0].data = malloc(72*128); //TODO use exmm + *player[0].data = bitmapLoadPcx("data/chikyuu.pcx", &gvar); // load sprite // input! IN_Default(0, &player,ctrl_Keyboard1); @@ -93,8 +93,10 @@ void main(int argc, char *argv[]) #ifdef MODEXZ #ifdef FADE modexPalBlack(); //reset the palette~ +#endif CA_LoadFile("data/spri/chikyuu.pal", &pal, &gvar); modexPalUpdate1(pal); +#ifdef FADE gpal = modexNewPal(); modexPalSave(gpal); modexSavePalFile("data/g.pal", gpal); @@ -178,7 +180,6 @@ void main(int argc, char *argv[]) } //p #ifdef FADE if(IN_KeyDown(24)){ modexPalUpdate0(gpal); paloffset=0; modexpdump(mv[0].page); IN_UserInput(1,1); } //p - if(IN_KeyDown(23)){ modexDrawSprite(mv[1].page, 160, 120, player[0].data); IN_UserInput(1,1); } //o if(IN_KeyDown(22)){ printf("2paloffset = %d\n", paloffset/3); IN_UserInput(1,1); @@ -203,8 +204,8 @@ void main(int argc, char *argv[]) } if(IN_KeyDown(66)) //f8 { - // modexDrawSprite(mv[0].page, 16, 16, p); - modexDrawSprite(mv[0].page, 32+48, 16, (player[0].data)); +// modexDrawSprite(mv[0].page, 16, 16, &p); + modexDrawSprite(mv[0].page, 32+72, 16, (player[0].data)); } //TODO fmemtest into page /*if(IN_KeyDown(4+1)) //4