modified: makefile
modified: maptest.exe
modified: src/lib/mapread.c
modified: src/lib/mapread.h
modified: src/maptest.c
#-zk0 = kanji support~
#-zkl = current codepage
#-zk0 = kanji support~
#-zkl = current codepage
-CFLAGS=-zkl -zm -mh -wo -x# -zdp# -zp16 -zq
+CFLAGS=-zkl -zm -wo -x# -mh# -zdp# -zp16 -zq
OFLAGS=-ot -ox -ob -oh -or# -om -ol -ol+
FLAGS=-0 -d2 $(OFLAGS) $(CFLAGS)
REMOVECOMMAND=del
OFLAGS=-ot -ox -ob -oh -or# -om -ol -ol+
FLAGS=-0 -d2 $(OFLAGS) $(CFLAGS)
REMOVECOMMAND=del
{
// fprintf(stdout, "[[[[%d|%d]]]]\n", &(t+1)->size, (t+1)->size);
// fprintf(stdout, "\n%.*s[xx[%d|%d]xx]\n", (t+1)->end - (t+1)->start, js+(t+1)->start, &(t+1)->size, (t+1)->size);
{
// fprintf(stdout, "[[[[%d|%d]]]]\n", &(t+1)->size, (t+1)->size);
// fprintf(stdout, "\n%.*s[xx[%d|%d]xx]\n", (t+1)->end - (t+1)->start, js+(t+1)->start, &(t+1)->size, (t+1)->size);
- map->data = /*_f*/malloc(sizeof(byte) * (t+1)->size);
+ map->data = _fmalloc(sizeof(byte) * (t+1)->size);
map->tiles = /*_f*/malloc(sizeof(tiles_t));
//map->tiles->data = malloc(sizeof(bitmap_t));
//fix this
map->tiles = /*_f*/malloc(sizeof(tiles_t));
//map->tiles->data = malloc(sizeof(bitmap_t));
//fix this
if (jsoneq(js, t, "height") == 0 && indent<=1)
{
strcpy(js_sv, "height");//strdup(js+t->start);//, t->end - t->start);
if (jsoneq(js, t, "height") == 0 && indent<=1)
{
strcpy(js_sv, "height");//strdup(js+t->start);//, t->end - t->start);
- }else if(jsoneq(js, t, "width") == 0 && indent<=1)
+ }else
+ if(jsoneq(js, t, "width") == 0 && indent<=1)
{
strcpy(js_sv, "width");//strdup(js+t->start);//, t->end - t->start);
}else strcpy(js_sv, "\0");
{
strcpy(js_sv, "width");//strdup(js+t->start);//, t->end - t->start);
}else strcpy(js_sv, "\0");
//#define DEBUG_MAPDATA
#define DEBUG_MAPVAR
//#define DEBUG_DUMPVARS
//#define DEBUG_MAPDATA
#define DEBUG_MAPVAR
//#define DEBUG_DUMPVARS
typedef struct {\r
bitmap_t *data;
typedef struct {\r
bitmap_t *data;
} tiles_t;\r
\r
typedef struct {\r
} tiles_t;\r
\r
typedef struct {\r
tiles_t *tiles;\r
unsigned int width;\r
unsigned int height;\r
tiles_t *tiles;\r
unsigned int width;\r
unsigned int height;\r
#include "src/lib/mapread.h"\r
#define DUMP
#include "src/lib/mapread.h"\r
#define DUMP
void
main(int argc, char *argv[])\r
void
main(int argc, char *argv[])\r
fprintf(stdout, "%04d[%02d]", i, map.data[i]);
if(i && !(i%map.width)) fprintf(stdout, "\n");
}
fprintf(stdout, "%04d[%02d]", i, map.data[i]);
if(i && !(i%map.width)) fprintf(stdout, "\n");
}
+ fprintf(stdout, "&map==%Fp\n", &map);
+ fprintf(stdout, "&map.tiles==%Fp\n", map.tiles);
+ fprintf(stdout, "&map.width==%Fp\n", map.width);
+ fprintf(stdout, "&map.height==%Fp\n", map.height);\r
+ fprintf(stdout, "&map.data==%Fp\n", map.data);