From: sparky4 Date: Sun, 24 May 2015 14:12:23 +0000 (-0500) Subject: broke.... again.... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=c9130ec378d97a7fcdee0aed180f3eca8a3ad880;p=16.git broke.... again.... modified: makefile modified: maptest.exe modified: pcxtest.exe modified: scroll.exe modified: src/lib/bitmap.c modified: src/lib/bitmap.h modified: src/lib/modex16.c modified: test.exe modified: test2.exe --- diff --git a/makefile b/makefile index f3f44d92..b0e0ff52 100644 --- a/makefile +++ b/makefile @@ -3,7 +3,7 @@ #-zkl = current codepage OFLAGS=-ot -ox -ob -oh# -or -om -ol -ol+ -FLAGS=-0 -d2 -wo $(OFLAGS) -zkl# -mh# -zdp# -zm# -zp16 -zq +FLAGS=-0 -d2 -wo $(OFLAGS) -zkl -mh# -zdp# -zm# -zp16 -zq DIRSEP=\ SRC=src$(DIRSEP) SRCLIB=$(SRC)lib$(DIRSEP) diff --git a/maptest.exe b/maptest.exe index 820f3f4c..d497b69b 100644 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/pcxtest.exe b/pcxtest.exe index 4a557710..e49a00e6 100644 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/scroll.exe b/scroll.exe index f4e5cd81..99dea667 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index 82a8525d..8d738607 100644 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -91,12 +91,12 @@ bitmapLoadPcx(char *filename) { /* allocate the buffer */ //printf("%zu\n", _memmax()); bufSize = (/*(dword)*/result.width * result.height); - result.data = malloc(bufSize); + result.data = (byte __near *)malloc(bufSize); // result.data = (byte far *)_fmalloc(bufSize); // result.data = (byte __huge *)halloc(bufSize, sizeof(byte)); printf("&bufSize=%p\n", &bufSize); printf("&result.data=%p\n", result.data); - printf("Size of block is %zu bytes\n", _fmsize(result.data)); + printf("Size of block is %zu bytes\n", _msize(result.data)); printf("Size of bufSize is %zu bytes\n", bufSize); printf("Size of result.width is %zu \n", result.width); printf("Size of result.height is %zu \n", result.height); diff --git a/src/lib/bitmap.h b/src/lib/bitmap.h index 31b94438..63a00311 100644 --- a/src/lib/bitmap.h +++ b/src/lib/bitmap.h @@ -7,7 +7,7 @@ #include "src/lib/lib_head.h" typedef struct { - byte far *data; + byte near *data; word width; word height; byte *palette; diff --git a/src/lib/modex16.c b/src/lib/modex16.c index fc1456db..08ab753d 100644 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -226,7 +226,7 @@ void modexDrawBmpRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp) { word poffset = (word) page->data + y*(page->width/4) + x/4; - byte far *data = bmp->data;//+bmp->offset; + byte *data = bmp->data;//+bmp->offset; word bmpOffset = (word) data + ry * bmp->width + rx; word width = rw; word height = rh; @@ -307,7 +307,7 @@ void modexDrawSpriteRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp) { word poffset = (word)page->data + y*(page->width/4) + x/4; - byte far *data = bmp->data;//+bmp->offset; + byte *data = bmp->data;//+bmp->offset; word bmpOffset = (word) data + ry * bmp->width + rx; word width = rw; word height = rh; diff --git a/test.exe b/test.exe index c15159df..ef787684 100644 Binary files a/test.exe and b/test.exe differ diff --git a/test2.exe b/test2.exe index 964f5fe8..6febdf23 100644 Binary files a/test2.exe and b/test2.exe differ