diff --git a/assets/converters.py b/assets/converters.py
index 54d0707..95356ea 100644
--- a/assets/converters.py
+++ b/assets/converters.py
@@ -28,8 +28,6 @@ def convert(input, output, params, target):
else:
return 1
-
-
def convert_world(input, output, params, target):
print( "WE ARE COMPUTING THE WORLD", input )
@@ -39,6 +37,7 @@ def convert_world(input, output, params, target):
if DEBUG: print( "So let's go ... ")
structWorld = fxconv.Structure()
+ structWorld += fxconv.string("DEBUG")
#structExtra = fxconv.Structure()
for i in range(nbMaps):
@@ -75,6 +74,7 @@ def convert_world(input, output, params, target):
structWorld += fxconv.ptr( map )
structWorld += fxconv.u32(0)
+ structWorld += fxconv.string("DEBUG")
#generate !
fxconv.elf(structWorld, output, "_" + params["name"], **target)
@@ -401,14 +401,25 @@ def get_extra_map_data(input, output, params, target, xmin, ymin, xmax, ymax):
#else we do nothing
else:
- print( "Unknown object type !" )
+ print( 'Unknown object type "'+tpe+'" !' )
structData += fxconv.u32(nbNPC)
- structData += fxconv.ptr(npcs)
+ if nbNPC:
+ structData += fxconv.ptr(npcs)
+ else:
+ structData += fxconv.u32(0)
+
structData += fxconv.u32(nbSign)
- structData += fxconv.ptr(signs)
+ if nbSign:
+ structData += fxconv.ptr(signs)
+ else:
+ structData += fxconv.u32(0)
+
structData += fxconv.u32(nbPortal)
- structData += fxconv.ptr(portals)
+ if nbPortal:
+ structData += fxconv.ptr(portals)
+ else:
+ structData += fxconv.u32(0)
return nbDiag, structData
diff --git a/assets/level0.tmx b/assets/level0.tmx
index 37ffd4b..b83ba50 100644
--- a/assets/level0.tmx
+++ b/assets/level0.tmx
@@ -172,7 +172,7 @@
-
+
diff --git a/src/game.h b/src/game.h
index 87ba409..2925135 100644
--- a/src/game.h
+++ b/src/game.h
@@ -152,7 +152,6 @@ typedef struct {
/* this is given by the layer Walkable of the map in Tiled */
uint8_t *walkable;
-
uint32_t nbNPC;
NPC *npcs;
@@ -168,6 +167,7 @@ typedef struct {
/* list of all the tiles to draw the background and the foreground layers */
uint16_t *layers[];
+
} Map;