all: test.exe pcxtest.exe test2.exe scroll.exe\r
\r
scroll.exe: scroll.obj modex16.obj dos_kb.obj bitmap.obj mapread.obj jsmn.obj\r
- wcl $(FLAGS) scroll.obj modex16.obj dos_kb.obj bitmap.obj mapread.obj jsmn.obj 16\lib\x\modex.lib\r
+ wcl $(FLAGS) scroll.obj modex16.obj dos_kb.obj bitmap.obj mapread.obj jsmn.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
//this function is quite messy ^^; sorry! it is a quick and dirty fix~
static int dump(const char *js, jsmntok_t *t, size_t count, int indent, /*char *js_sv,*/ map_t *map, int q/*, int *w*/) {
int i, j, k;
+ bitmap_t bp;
if (count == 0) {
return 0;
}
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)%4;
// printf("%d[%d]", q, map->data[q]);
}
else
// printf("\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 = malloc(sizeof(byte) * (t+1)->size);
map->tiles = malloc(sizeof(tiles_t));
- map->tiles->data = malloc(sizeof(bitmap_t));
- //map->tiles->data = bitmapLoadPcx("data/chikyuu.pcx");
- map->tiles->data->data = malloc((16/**2*/)*16);
- map->tiles->data->width = (16/**2*/);\r
- map->tiles->data->height= 16;\r
+ //map->tiles->data = malloc(sizeof(bitmap_t));
+ printf("ed.pcx\n");
+ bp = bitmapLoadPcx("data/ed.pcx");
+ printf("ed.pcx\n");
+ map->tiles->data = &bp;
+ //map->tiles->data->data = malloc((16/**2*/)*16);
+ //map->tiles->data->width = (16/**2*/);\r
+ //map->tiles->data->height= 16;\r
map->tiles->tileHeight = 16;\r
map->tiles->tileWidth = 16;\r
map->tiles->rows = 1;\r
\r
/* create the map */
loadmap("data/test.map", &map/*, 0*/);
-// map = allocMap(map.width,map.height); //20x15 is the resolution of the screen you can make maps smaller than 20x15 but the null space needs to be drawn properly
+//---- map = allocMap(map.width,map.height); //20x15 is the resolution of the screen you can make maps smaller than 20x15 but the null space needs to be drawn properly
//if(isEMS()) printf("%d tesuto\n", coretotalEMS());\r
-// initMap(&map);\r
+//---- initMap(&map);\r
mv.map = ↦\r
mv2.map = ↦\r
mv3.map = ↦\r
}\r
if(player.q == (TILEWH/SPEED)+1 && player.d > 0 && (player.triggerx == 5 && player.triggery == 5)){ player.hp--; }\r
//if(keyp(0x0E)) while(1){ if(xmsmalloc(24)) break; }
+ modexDrawBmp(bg->page, 0, 0, map.tiles->data);
+ modexDrawBmp(spri->page, 0, 0, map.tiles->data);
if(keyp(87))
{
modexLeave();\r