-OFLAGS=-ot -ox -ob -ol -oh -or
-FLAGS=-0 -d2 -wo $(OFLAGS) -mh
+#-zk0u = translate kanji to unicode... wwww
+#-zk0 = kanji support~
+#-zkl = current codepage
+
+OFLAGS=-ot -ox -ob -oh# -or -om -ol -ol+
+FLAGS=-0 -d2 -wo $(OFLAGS) -zkl# -mh# -zdp# -zm# -zp16 -zq
DIRSEP=\
SRC=src$(DIRSEP)\r
SRCLIB=$(SRC)lib$(DIRSEP)
wcl $(FLAGS) scroll.obj modex16.obj dos_kb.obj bitmap.obj mapread.obj jsmn.obj lib_head.obj# 16/lib/x/modex.lib\r
scroll.obj: $(SRC)scroll.c\r
wcl $(FLAGS) -c $(SRC)scroll.c\r
-test.exe: test.obj modex16.obj bitmap.obj\r
- wcl $(FLAGS) test.obj modex16.obj bitmap.obj\r
+test.exe: test.obj modex16.obj bitmap.obj lib_head.obj\r
+ wcl $(FLAGS) test.obj modex16.obj bitmap.obj lib_head.obj\r
\r
-test2.exe: test2.obj modex16.obj bitmap.obj planar.obj\r
- wcl $(FLAGS) test2.obj modex16.obj bitmap.obj planar.obj\r
+test2.exe: test2.obj modex16.obj bitmap.obj planar.obj lib_head.obj\r
+ wcl $(FLAGS) test2.obj modex16.obj bitmap.obj planar.obj lib_head.obj\r
\r
-pcxtest.exe: pcxtest.obj modex16.obj bitmap.obj\r
- wcl $(FLAGS) pcxtest.obj modex16.obj bitmap.obj\r
+pcxtest.exe: pcxtest.obj modex16.obj bitmap.obj lib_head.obj\r
+ wcl $(FLAGS) pcxtest.obj modex16.obj bitmap.obj lib_head.obj\r
\r
maptest.exe: maptest.obj mapread.obj jsmn.obj modex16.obj bitmap.obj lib_head.obj\r
wcl $(FLAGS) maptest.obj mapread.obj jsmn.obj modex16.obj bitmap.obj lib_head.obj\r
planar.obj: $(SRCLIB)planar.h $(SRCLIB)planar.c\r
wcl $(FLAGS) -c $(SRCLIB)planar.c\r
\r
-mapread.obj: $(SRCLIB)mapread.h $(SRCLIB)mapread.c# lib_head.obj jsmn.obj\r
+mapread.obj: $(SRCLIB)mapread.h $(SRCLIB)mapread.c\r
wcl $(FLAGS) -c $(SRCLIB)mapread.c\r
\r
lib_head.obj: $(SRCLIB)lib_head.h $(SRCLIB)lib_head.c\r
jsmn.obj: $(JSMNLIB)jsmn.h $(JSMNLIB)jsmn.c\r
wcl $(FLAGS) -c $(JSMNLIB)jsmn.c
-clean:\r
- del *.obj\r
-# del *.exe\r
+clean: .symbolic\r
+ @del *.obj\r
+# @del *.exe\r
/* load the first part of the pcx file */\r
loadPcxStage1(file, &result);
\r
- /* allocate the buffer */\r
- bufSize = (result.width * result.height);
- result.data = malloc((bufSize));
- printf("Size of block is %u bytes\n", _msize(result.data));
- printf("Size of bufSize is %lu bytes\n", bufSize);
- printf("Size of result.width is %d \n", result.width);
- printf("Size of result.height is %d \n", result.height);
- printf("Dimensions of result is %lu\n", result.width*result.height);
+ /* allocate the buffer */
+ //printf("%zu\n", _memmax());\r
+ bufSize = (/*(dword)*/result.width * result.height);
+// result.data = 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 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);
+ 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.");\r
val = count;\r
count = 1;\r
}\r
-\r
+
/* write the pixel the specified number of times */\r
for(; count && index < bufSize; count--,index++) {\r
result.data[index] = val;\r
#include "src/lib/lib_head.h"
\r
typedef struct {\r
- byte *data;
+ byte far *data;
word width;\r
word height;\r
byte *palette;
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 *data = bmp->data;//+bmp->offset;
+ byte far *data = bmp->data;//+bmp->offset;
word bmpOffset = (word) data + ry * bmp->width + rx;
word width = rw;
word height = rh;
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 *data = bmp->data;//+bmp->offset;
+ byte far *data = bmp->data;//+bmp->offset;
word bmpOffset = (word) data + ry * bmp->width + rx;
word width = rw;
word height = rh;
page=modexDefaultPage();\r
\r
//0000 bmp = bitmapLoadPcx("data/koishi~~.pcx");
- bmp = bitmapLoadPcx("data/chikyuu.pcx");
-// bmp = bitmapLoadPcx("data/koishi^^.pcx");
+// bmp = bitmapLoadPcx("data/chikyuu.pcx");
+ bmp = bitmapLoadPcx("data/koishi^^.pcx");
// bmp = bitmapLoadPcx("16/PCX_LIB/chikyuu.pcx");
//0000 p = planar_buf_from_bitmap(&bmp);\r
modexEnter();\r