-FLAGS=-0 -d2 -mh \r
+FLAGS=-0 -d2 \r
SRC=src\\r
SRCLIB=$(SRC)lib\\r
all: test.exe pcxtest.exe test2.exe scroll.exe\r
pcxtest.exe: pcxtest.obj modex16.obj bitmap.obj\r
wcl $(FLAGS) pcxtest.obj modex16.obj bitmap.obj\r
\r
-maptest.exe: maptest.obj mapread.obj jsmn.obj\r
- wcl $(FLAGS) maptest.obj jsmn.obj\r
+maptest.exe: maptest.obj mapread.obj jsmn.obj modex16.obj bitmap.obj\r
+ wcl $(FLAGS) maptest.obj jsmn.obj modex16.obj bitmap.obj\r
+\r
\r
test.obj: $(SRC)test.c $(SRCLIB)modex16.h\r
wcl $(FLAGS) -c $(SRC)test.c\r
*/\r
#ifndef BITMAP_H\r
#define BITMAP_H
-#include <malloc.h>\r
+//#include <malloc.h>\r
#include "src/lib/types.h"\r
typedef struct {\r
byte *data;
FUCK well i am stuck.... wwww
*/
- map->data[q] = (byte)strtol(js+t->start, (char **)t->end, 10);
+//++++ map->data[q] = (byte)strtol(js+t->start, (char **)t->end, 10);
// printf("%d[%d]", q, map->data[q]);
}
else
/* Prepare parser */
jsmn_init(&p);
-
+fprintf(stderr, "b4 malloc\n");
/* Allocate some tokens as a start */
tok = malloc(sizeof(*tok) * tokcount);
if (tok == NULL) {
eof_expected = 1;
}
}
+fprintf(stderr, "a4 malloc\n");
free(js);
free(tok);
#define _LIBMAPREAD_H_
#include <string.h>
#include <errno.h>
+
+//#include <stdlib.h>
+
#include "src/lib/jsmn/jsmn.h"
#include "src/lib/modex16.h"
#include "src/lib/lib_head.h"
#ifndef MODEX16_H
#define MODEX16_H
#include <conio.h>
-#include "src\lib\types.h"
-#include "src\lib\bitmap.h"
-#include "src\lib\planar.h"
+#include "src/lib/types.h"
+#include "src/lib/bitmap.h"
+#include "src/lib/planar.h"
/* -========================== Types & Macros ==========================- */
#define PAGE_OFFSET(x,y) (((y)<<6)+((y)<<4)+((x)>>2))
#include "src/lib/mapread.c"\r
\r
-int main()\r
+void
+main(int argc, char *argv[])\r
{\r
- map_t map;\r
- loadmap("data/test.map", &map);\r
- return 0;\r
+ map_t map;
+ fprintf(stderr, "wwww\n");\r
+ //loadmap("data/test.map", &map);
+ fprintf(stderr, "wwww\n");\r
}\r
-#include "src\lib\modex16.h"\r
+#include "src/lib/modex16.h"\r
\r
void\r
main() {\r
- byte *pal;\r
+ byte *pal;\r
\r
- modexEnter();\r
+ modexEnter();\r
\r
- pal = modexNewPal();\r
- modexPalSave(pal);\r
+ pal = modexNewPal();\r
+ modexPalSave(pal);\r
\r
- modexSavePalFile("gfx.pal", pal);\r
+ modexSavePalFile("gfx.pal", pal);\r
\r
- modexLeave();\r
+ modexLeave();\r
\r
}\r
#include <stdio.h>
#include <dos.h>
#include <string.h>\r
-#include "src\lib\modex16.h"\r
-#include "src\lib\bitmap.h"
-#include "src\lib\planar.c"\r
+#include "src/lib/modex16.h"\r
+#include "src/lib/bitmap.h"
+#include "src/lib/planar.c"\r
\r
word far* clock= (word far*) 0x046C; /* 18.2hz clock */\r
\r
-#include "src\lib\modex16.h"\r
+#include "src/lib/modex16.h"\r
#include <stdio.h>\r
\r
word far* clock= (word far*) 0x046C; /* 18.2hz clock */\r
#include <stdio.h>
#include <conio.h>
-#include "src\lib\modex16.h"\r
-#include "src\lib\planar.h"\r
-#include "src\lib\bitmap.h"\r
+#include "src/lib/modex16.h"\r
+#include "src/lib/planar.h"\r
+#include "src/lib/bitmap.h"\r
\r
word far* clock= (word far*) 0x046C; /* 18.2hz clock */\r
\r