From: sparky4 Date: Sat, 23 May 2015 23:33:03 +0000 (-0500) Subject: oh shit!!! X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=1073f7dbfa5b78819af46c64f3ffd0301e9d8cc6;p=16.git oh shit!!! renamed: EMSTEST.EXE -> limems_0.exe modified: makefile deleted: mapread.exe new file: maptest.exe modified: scroll.exe modified: src/lib/bitmap.h modified: src/lib/mapread.c modified: src/lib/mapread.h modified: src/lib/modex16.h modified: src/maptest.c modified: src/palettec.c modified: src/pcxtest.c modified: src/test.c modified: src/test2.c --- diff --git a/EMSTEST.EXE b/limems_0.exe similarity index 100% rename from EMSTEST.EXE rename to limems_0.exe diff --git a/makefile b/makefile index 09ad5ba8..433caf81 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ -FLAGS=-0 -d2 -mh +FLAGS=-0 -d2 SRC=src\ SRCLIB=$(SRC)lib\ all: test.exe pcxtest.exe test2.exe scroll.exe @@ -16,8 +16,9 @@ test2.exe: test2.obj modex16.obj bitmap.obj planar.obj pcxtest.exe: pcxtest.obj modex16.obj bitmap.obj wcl $(FLAGS) pcxtest.obj modex16.obj bitmap.obj -maptest.exe: maptest.obj mapread.obj jsmn.obj - wcl $(FLAGS) maptest.obj jsmn.obj +maptest.exe: maptest.obj mapread.obj jsmn.obj modex16.obj bitmap.obj + wcl $(FLAGS) maptest.obj jsmn.obj modex16.obj bitmap.obj + test.obj: $(SRC)test.c $(SRCLIB)modex16.h wcl $(FLAGS) -c $(SRC)test.c diff --git a/mapread.exe b/mapread.exe deleted file mode 100644 index e69de29b..00000000 diff --git a/maptest.exe b/maptest.exe new file mode 100644 index 00000000..ec5c9720 Binary files /dev/null and b/maptest.exe differ diff --git a/scroll.exe b/scroll.exe index e69de29b..38e70859 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/bitmap.h b/src/lib/bitmap.h index 17bb0d94..19ae2f04 100644 --- a/src/lib/bitmap.h +++ b/src/lib/bitmap.h @@ -3,7 +3,7 @@ */ #ifndef BITMAP_H #define BITMAP_H -#include +//#include #include "src/lib/types.h" typedef struct { byte *data; diff --git a/src/lib/mapread.c b/src/lib/mapread.c index 8f84071a..73fefcd0 100644 --- a/src/lib/mapread.c +++ b/src/lib/mapread.c @@ -26,7 +26,7 @@ static int dump(const char *js, jsmntok_t *t, size_t count, int indent, /*char * 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 @@ -112,7 +112,7 @@ static int loadmap(char *mn, map_t *map) /* Prepare parser */ jsmn_init(&p); - +fprintf(stderr, "b4 malloc\n"); /* Allocate some tokens as a start */ tok = malloc(sizeof(*tok) * tokcount); if (tok == NULL) { @@ -161,6 +161,7 @@ again: eof_expected = 1; } } +fprintf(stderr, "a4 malloc\n"); free(js); free(tok); diff --git a/src/lib/mapread.h b/src/lib/mapread.h index 8b1b3e0a..1ce7b01e 100644 --- a/src/lib/mapread.h +++ b/src/lib/mapread.h @@ -2,6 +2,9 @@ #define _LIBMAPREAD_H_ #include #include + +//#include + #include "src/lib/jsmn/jsmn.h" #include "src/lib/modex16.h" #include "src/lib/lib_head.h" diff --git a/src/lib/modex16.h b/src/lib/modex16.h index 2a4987a5..fa9e54e0 100644 --- a/src/lib/modex16.h +++ b/src/lib/modex16.h @@ -4,9 +4,9 @@ #ifndef MODEX16_H #define MODEX16_H #include -#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)) diff --git a/src/maptest.c b/src/maptest.c index e25c9818..ae016eec 100644 --- a/src/maptest.c +++ b/src/maptest.c @@ -1,8 +1,10 @@ #include "src/lib/mapread.c" -int main() +void +main(int argc, char *argv[]) { - map_t map; - loadmap("data/test.map", &map); - return 0; + map_t map; + fprintf(stderr, "wwww\n"); + //loadmap("data/test.map", &map); + fprintf(stderr, "wwww\n"); } diff --git a/src/palettec.c b/src/palettec.c index 630d7b35..09b25945 100644 --- a/src/palettec.c +++ b/src/palettec.c @@ -1,16 +1,16 @@ -#include "src\lib\modex16.h" +#include "src/lib/modex16.h" void main() { - byte *pal; + byte *pal; - modexEnter(); + modexEnter(); - pal = modexNewPal(); - modexPalSave(pal); + pal = modexNewPal(); + modexPalSave(pal); - modexSavePalFile("gfx.pal", pal); + modexSavePalFile("gfx.pal", pal); - modexLeave(); + modexLeave(); } diff --git a/src/pcxtest.c b/src/pcxtest.c index f735a559..60cc85e2 100644 --- a/src/pcxtest.c +++ b/src/pcxtest.c @@ -1,9 +1,9 @@ #include #include #include -#include "src\lib\modex16.h" -#include "src\lib\bitmap.h" -#include "src\lib\planar.c" +#include "src/lib/modex16.h" +#include "src/lib/bitmap.h" +#include "src/lib/planar.c" word far* clock= (word far*) 0x046C; /* 18.2hz clock */ diff --git a/src/test.c b/src/test.c index fd2ec3f9..24520a53 100644 --- a/src/test.c +++ b/src/test.c @@ -1,4 +1,4 @@ -#include "src\lib\modex16.h" +#include "src/lib/modex16.h" #include word far* clock= (word far*) 0x046C; /* 18.2hz clock */ diff --git a/src/test2.c b/src/test2.c index 48299a41..8926372d 100644 --- a/src/test2.c +++ b/src/test2.c @@ -1,8 +1,8 @@ #include #include -#include "src\lib\modex16.h" -#include "src\lib\planar.h" -#include "src\lib\bitmap.h" +#include "src/lib/modex16.h" +#include "src/lib/planar.h" +#include "src/lib/bitmap.h" word far* clock= (word far*) 0x046C; /* 18.2hz clock */