mirror of
https://git.planet-casio.com/Slyvtt/Collab_RPG.git
synced 2025-04-19 09:27:16 +02:00
Merge branch 'dev' of git.planet-casio.com:Slyvtt/Collab_RPG into dev
This commit is contained in:
commit
86bb0a9cfc
18 changed files with 182 additions and 92 deletions
|
@ -72,6 +72,7 @@ set(ASSETS_cg
|
|||
|
||||
set(ASSETS_cg_EGA64
|
||||
assets-cg/ega64/tileset/tilesetEGA64_CG.png
|
||||
assets-cg/ega64/tileset/tileset_inEGA64_CG.png
|
||||
)
|
||||
|
||||
set(ASSETS_fx
|
||||
|
@ -86,6 +87,7 @@ set(ASSETS_fx
|
|||
|
||||
set(ASSETS_fx_1b
|
||||
assets-fx/1b/tileset/tileset1b.png
|
||||
assets-fx/1b/tileset/tileset_in1b.png
|
||||
assets-fx/1b/npc/char/npc_male.png
|
||||
assets-fx/1b/npc/char/npc_female.png
|
||||
assets-fx/1b/npc/char/npc_milkman.png
|
||||
|
@ -100,6 +102,7 @@ set(ASSETS_fx_1b
|
|||
|
||||
set(ASSETS_fx_2b
|
||||
assets-fx/2b/tileset/tileset2b.png
|
||||
assets-fx/2b/tileset/tileset_in2b.png
|
||||
assets-fx/2b/npc/char/npc_male.png
|
||||
assets-fx/2b/npc/char/npc_female.png
|
||||
assets-fx/2b/npc/char/npc_milkman.png
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
tileset1b_CG.png:
|
||||
type: bopti-image
|
||||
name: img_tilesetnpp
|
||||
profile: p8
|
Binary file not shown.
Before Width: | Height: | Size: 43 KiB |
Binary file not shown.
Before Width: | Height: | Size: 31 KiB |
|
@ -1,5 +0,0 @@
|
|||
tileset2b_CG.png:
|
||||
type: bopti-image
|
||||
name: img_tilesetnpp
|
||||
profile: p8
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 37 KiB |
|
@ -3,3 +3,7 @@ tilesetEGA64_CG.png:
|
|||
name: img_tilesetnpp
|
||||
profile: p8
|
||||
|
||||
tileset_inEGA64_CG.png:
|
||||
type: bopti-image
|
||||
name: img_indoor
|
||||
profile: p8
|
||||
|
|
|
@ -2,3 +2,6 @@ tileset1b.png:
|
|||
type: bopti-image
|
||||
name: img_tilesetnpp
|
||||
|
||||
tileset_in1b.png:
|
||||
type: bopti-image
|
||||
name: img_indoor
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
tileset2b.png:
|
||||
type: bopti-image
|
||||
name: img_tilesetnpp
|
||||
|
||||
tileset_in2b.png:
|
||||
type: bopti-image
|
||||
name: img_indoor
|
||||
|
|
|
@ -28,6 +28,8 @@ from tinytiled import *
|
|||
|
||||
# If the output of the converter should be verbose.
|
||||
VERBOSE = 1
|
||||
# The valid path objects.
|
||||
PATH_TYPES = ["polyline", "polygon"]
|
||||
# The sign types, used to find the sign icon.
|
||||
SIGN_TYPES = ["SGN", "INFO"]
|
||||
# The NPC faces, used to find the face id.
|
||||
|
@ -71,6 +73,8 @@ def convert_map(input: str, output: str, params: dict, target):
|
|||
signs = {}
|
||||
portals = {}
|
||||
|
||||
indoor = 0
|
||||
|
||||
name = os.path.splitext(os.path.basename(input))[0]
|
||||
|
||||
map_struct = fxconv.Structure()
|
||||
|
@ -115,7 +119,7 @@ def convert_map(input: str, output: str, params: dict, target):
|
|||
# Get the outdoor tileset
|
||||
try:
|
||||
if VERBOSE: print("INFO: Getting the outdoor tileset")
|
||||
outdoor_tileset = input_map.get_tileset_by_firstgid(1)
|
||||
outdoor_tileset = input_map.get_tileset_by_name("tilesetnpp")
|
||||
except Exception as e:
|
||||
# Show a simple error message on failure.
|
||||
sys.stderr.write(f"ERROR: Failed to get the outdoor tileset.\n"
|
||||
|
@ -125,13 +129,33 @@ def convert_map(input: str, output: str, params: dict, target):
|
|||
# Get the walkable tileset
|
||||
try:
|
||||
if VERBOSE: print("INFO: Getting the walkable tileset")
|
||||
walkable_tileset = input_map.get_tileset_by_firstgid(409)
|
||||
walkable_tileset = input_map.get_tileset_by_name("Walkable")
|
||||
except Exception as e:
|
||||
# Show a simple error message on failure.
|
||||
sys.stderr.write(f"ERROR: Failed to get the walkable tileset.\n"
|
||||
+ f" Error message: {e}\n")
|
||||
sys.exit(1)
|
||||
|
||||
# Check if this is an indoor map
|
||||
try:
|
||||
if VERBOSE: print("INFO: Checking if it is an indoor map")
|
||||
indoor = int(input_map.get_property("indoor"))
|
||||
except Exception as e:
|
||||
# Show a warning
|
||||
print(f"WARNING: Indoor property not found.\n")
|
||||
|
||||
if indoor:
|
||||
# Get the indoor tileset
|
||||
try:
|
||||
if VERBOSE: print("INFO: Getting the indoor tileset (it is an\n"
|
||||
+ " indoor map)")
|
||||
indoor_tileset = input_map.get_tileset_by_name("indoor")
|
||||
except Exception as e:
|
||||
# Show a simple error message on failure.
|
||||
sys.stderr.write(f"ERROR: Failed to get the indoor tileset.\n"
|
||||
+ f" Error message: {e}\n")
|
||||
sys.exit(1)
|
||||
|
||||
# Get the background
|
||||
try:
|
||||
if VERBOSE: print("INFO: Getting the background layer")
|
||||
|
@ -141,6 +165,9 @@ def convert_map(input: str, output: str, params: dict, target):
|
|||
height = bg_layer.get_height()
|
||||
if VERBOSE: print(f"INFO: Map size: ({width}, {height}).")
|
||||
# Get the layer data himself
|
||||
if indoor:
|
||||
background_layer = bg_layer.get_data_with_tileset(indoor_tileset)
|
||||
else:
|
||||
background_layer = bg_layer.get_data_with_tileset(outdoor_tileset)
|
||||
# Check if the size of the layer data is correct.
|
||||
if len(background_layer) != width*height:
|
||||
|
@ -157,6 +184,9 @@ def convert_map(input: str, output: str, params: dict, target):
|
|||
if VERBOSE: print("INFO: Getting the foreground layer")
|
||||
fg_layer = input_map.get_layer_by_name("Foreground")
|
||||
# Get the layer data himself
|
||||
if indoor:
|
||||
foreground_layer = fg_layer.get_data_with_tileset(indoor_tileset)
|
||||
else:
|
||||
foreground_layer = fg_layer.get_data_with_tileset(outdoor_tileset)
|
||||
# Check if the size of the layer data is correct.
|
||||
if len(foreground_layer) != width*height:
|
||||
|
@ -190,7 +220,7 @@ def convert_map(input: str, output: str, params: dict, target):
|
|||
ed_objgroup = input_map.get_objectgroup_by_name("ExtraData")
|
||||
# Get the paths the NPCs take.
|
||||
for object in ed_objgroup.objects:
|
||||
if object.get_data_type() == "polyline":
|
||||
if object.get_data_type() in PATH_TYPES:
|
||||
npc_paths[object.id] = object.get_data()
|
||||
# Get the NPCs
|
||||
for object in ed_objgroup.objects:
|
||||
|
@ -252,8 +282,14 @@ def convert_map(input: str, output: str, params: dict, target):
|
|||
map_struct += fxconv.u32(width)
|
||||
map_struct += fxconv.u32(height)
|
||||
map_struct += fxconv.u32(3)
|
||||
map_struct += fxconv.u32(outdoor_tileset.columns)
|
||||
tileset_name = os.path.splitext(os.path.basename(outdoor_tileset.source))[0]
|
||||
if indoor: map_struct += fxconv.u32(indoor_tileset.columns)
|
||||
else: map_struct += fxconv.u32(outdoor_tileset.columns)
|
||||
if indoor:
|
||||
tileset_name = os.path.splitext(
|
||||
os.path.basename(indoor_tileset.source))[0]
|
||||
else:
|
||||
tileset_name = os.path.splitext(
|
||||
os.path.basename(outdoor_tileset.source))[0]
|
||||
map_struct += fxconv.ref(f"img_{tileset_name}")
|
||||
|
||||
# Store the walkable layer
|
||||
|
@ -335,6 +371,7 @@ def convert_map(input: str, output: str, params: dict, target):
|
|||
# separately.
|
||||
dialog_name = os.path.splitext(os.path.basename(dialog_file))[0]
|
||||
map_struct += fxconv.ref(f"_{dialog_name}")
|
||||
map_struct += fxconv.u32(indoor)
|
||||
|
||||
# Store the background layer
|
||||
background_data = bytes()
|
||||
|
|
1
assets/indoor.png
Symbolic link
1
assets/indoor.png
Symbolic link
|
@ -0,0 +1 @@
|
|||
../assets-fx/2b/tileset/tileset_in2b.png
|
4
assets/indoor.tsx
Normal file
4
assets/indoor.tsx
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<tileset version="1.8" tiledversion="1.8.2" name="indoor" tilewidth="8" tileheight="8" tilecount="286" columns="22">
|
||||
<image source="indoor.png" width="176" height="104"/>
|
||||
</tileset>
|
|
@ -1,54 +1,93 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="1.8" tiledversion="1.8.2" orientation="orthogonal" renderorder="right-down" width="12" height="8" tilewidth="8" tileheight="8" infinite="0" nextlayerid="5" nextobjectid="3">
|
||||
<map version="1.8" tiledversion="1.8.2" orientation="orthogonal" renderorder="right-down" width="24" height="16" tilewidth="8" tileheight="8" infinite="0" nextlayerid="5" nextobjectid="5">
|
||||
<properties>
|
||||
<property name="dialogFile" type="file" value="interior1_0_dialogs.json"/>
|
||||
<property name="mapX" type="int" value="65536"/>
|
||||
<property name="mapY" type="int" value="65536"/>
|
||||
<property name="indoor" type="int" value="1"/>
|
||||
<property name="mapX" type="int" value="0"/>
|
||||
<property name="mapY" type="int" value="0"/>
|
||||
</properties>
|
||||
<tileset firstgid="1" source="tilesetnpp.tsx"/>
|
||||
<tileset firstgid="409" source="Walkable.tsx"/>
|
||||
<layer id="1" name="Background" width="12" height="8">
|
||||
<tileset firstgid="413" source="indoor.tsx"/>
|
||||
<layer id="1" name="Background" width="24" height="16">
|
||||
<data encoding="csv">
|
||||
86,90,91,89,90,91,89,90,91,89,90,92,
|
||||
110,114,115,113,114,115,113,114,115,113,114,116,
|
||||
86,93,94,1,1,1,1,1,9,10,1,92,
|
||||
110,117,118,1,1,1,1,1,33,34,1,116,
|
||||
86,1,1,1,1,1,1,1,1,1,1,92,
|
||||
110,1,1,1,1,133,2,1,1,1,1,116,
|
||||
110,1,1,1,1,2,2,1,1,1,1,92,
|
||||
110,114,114,114,114,114,114,114,114,114,114,116
|
||||
425,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,427,
|
||||
447,617,624,625,626,628,582,583,584,627,628,618,619,620,621,622,622,622,580,581,622,622,623,449,
|
||||
447,639,646,647,648,650,604,605,606,649,650,640,641,642,643,644,644,644,602,603,644,644,645,449,
|
||||
447,661,668,669,670,672,668,669,670,672,672,662,663,664,665,671,672,671,671,671,672,666,667,449,
|
||||
447,691,692,693,694,691,692,693,694,691,692,691,692,693,694,630,631,630,631,630,631,630,631,449,
|
||||
447,413,414,414,414,414,414,414,414,414,414,414,415,416,678,652,653,652,653,652,653,652,653,449,
|
||||
447,435,436,436,436,436,436,436,436,436,436,436,437,438,678,678,678,678,678,678,678,678,678,449,
|
||||
447,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,553,554,555,678,553,554,555,449,
|
||||
447,678,613,614,678,613,614,678,613,614,678,678,678,678,678,678,575,576,577,678,575,576,577,449,
|
||||
447,678,635,636,678,635,636,678,635,636,678,678,678,678,678,678,597,598,599,678,597,598,599,449,
|
||||
447,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,449,
|
||||
447,678,553,554,555,678,678,553,554,555,678,678,678,678,678,678,553,554,555,678,553,554,555,449,
|
||||
447,678,575,576,577,678,678,575,576,577,611,612,678,678,611,612,575,576,577,678,575,576,577,449,
|
||||
447,678,597,598,599,678,678,597,598,599,633,634,675,675,633,634,597,598,599,678,597,598,599,449,
|
||||
447,678,678,678,678,678,678,678,678,678,655,656,675,675,655,656,678,678,678,678,678,678,678,449,
|
||||
469,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,471
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="2" name="Foreground" width="12" height="8">
|
||||
<layer id="2" name="Foreground" width="24" height="16">
|
||||
<data encoding="csv">
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="3" name="Walkable" width="12" height="8">
|
||||
<layer id="3" name="Walkable" width="24" height="16">
|
||||
<data encoding="csv">
|
||||
410,410,410,410,410,410,410,410,410,410,410,410,
|
||||
410,410,410,410,410,410,410,410,410,410,410,410,
|
||||
410,410,410,0,0,0,0,0,410,0,0,410,
|
||||
410,410,410,0,0,0,0,0,410,0,0,410,
|
||||
410,0,0,0,0,0,0,0,0,0,0,410,
|
||||
410,0,0,0,0,0,0,0,0,0,0,410,
|
||||
410,0,0,0,0,0,0,0,0,0,0,410,
|
||||
410,410,410,410,410,410,410,410,410,410,410,410
|
||||
410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,
|
||||
410,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,0,0,0,0,0,0,0,410,
|
||||
410,409,409,409,409,409,409,409,409,409,409,410,410,410,410,409,0,0,0,0,0,0,0,410,
|
||||
410,410,410,410,410,410,410,410,410,410,410,410,409,409,410,410,410,410,410,410,410,410,410,410,
|
||||
410,409,409,409,409,409,409,409,409,409,409,409,409,409,409,410,410,410,410,410,410,410,410,410,
|
||||
410,410,410,410,410,410,410,410,410,410,410,410,410,410,409,410,410,410,410,410,410,410,410,410,
|
||||
410,410,410,410,410,410,410,410,410,410,410,410,410,410,409,409,0,0,0,0,0,0,0,410,
|
||||
410,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,410,410,410,0,410,410,410,410,
|
||||
410,409,410,410,409,410,410,409,410,410,409,409,409,409,409,409,410,410,410,0,410,410,410,410,
|
||||
410,409,410,410,409,410,410,409,410,410,409,409,409,409,409,409,410,410,410,0,410,410,410,410,
|
||||
410,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,410,
|
||||
410,0,410,410,410,0,0,410,410,410,0,0,0,0,0,0,410,410,410,0,410,410,410,410,
|
||||
410,0,410,410,410,0,0,410,410,410,410,410,0,0,410,410,410,410,410,0,410,410,410,410,
|
||||
410,0,410,410,410,0,0,410,410,410,410,410,0,0,410,410,410,410,410,0,410,410,410,410,
|
||||
410,0,0,0,0,0,0,0,0,0,410,410,0,0,410,410,0,0,0,0,0,0,0,410,
|
||||
410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410
|
||||
</data>
|
||||
</layer>
|
||||
<objectgroup id="4" name="ExtraData">
|
||||
<object id="2" name="porte" type="PORTAL" x="39.6736" y="40.0979" width="15.8058" height="15.9119">
|
||||
<object id="2" name="porte" type="PORTAL" x="95.4054" y="103.537" width="15.8058" height="15.9119">
|
||||
<properties>
|
||||
<property name="dest" type="file" value="level0.tmx"/>
|
||||
<property name="destPortal" value="taverne"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object id="3" name="SERVEUR" type="NPC" x="109.092" y="88.3408">
|
||||
<properties>
|
||||
<property name="dialogID" type="int" value="0"/>
|
||||
<property name="face" value="MALE"/>
|
||||
<property name="hasPath" type="int" value="1"/>
|
||||
<property name="needAction" type="int" value="1"/>
|
||||
<property name="path" type="object" value="4"/>
|
||||
</properties>
|
||||
<point/>
|
||||
</object>
|
||||
<object id="4" name="Chemin serveur" type="TRJ" x="108.796" y="87.7479">
|
||||
<polygon points="0,0 43.2811,-4.74313 46.2455,19.5654 46.542,-34.6841 50.3958,-4.74313 -97.8271,-3.85379 -97.5306,28.1623 -61.0678,27.8659 -53.0638,27.8659 -61.3642,23.4192 -58.3998,-2.66801 -48.6171,-7.41114 -50.0993,-28.1623 8.30048,-28.7552 7.70759,-52.7673 -69.6647,-52.4709 8.30048,-53.0638 9.48626,-26.6801"/>
|
||||
</object>
|
||||
</objectgroup>
|
||||
</map>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{ "dialogs":[
|
||||
{ "ID":0,
|
||||
"dialog":"_",
|
||||
"isQuestion":0,
|
||||
"choice":"_",
|
||||
"conclusion1":"_",
|
||||
"dialog":"Bonjour, qu'est ce que je vous sers ?",
|
||||
"isQuestion":1,
|
||||
"choice":"Une pinte de biere$Rien",
|
||||
"conclusion1":"Voici pour vous.`$life+10`",
|
||||
"next1":-1,
|
||||
"conclusion2":"_",
|
||||
"conclusion2":"Bah qu'est ce que vous faites ici alors !",
|
||||
"next2":-1,
|
||||
"nextOther":1
|
||||
"nextOther":-1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit b084ecda91a2352a72a5d1a61b37e0009228ee40
|
||||
Subproject commit b88240b6f8cb3ccace66ae7ea4801b5acefc91ff
|
|
@ -144,9 +144,10 @@ typedef struct {
|
|||
uint32_t nbdialogsdata;
|
||||
Dialog *dialogs;
|
||||
|
||||
uint32_t indoor;
|
||||
|
||||
/* list of all the tiles to draw the background and the foreground layers */
|
||||
uint16_t *layers[];
|
||||
|
||||
} Map;
|
||||
|
||||
/* This struct will contain all the data of the game. It will make it possible
|
||||
|
|
16
src/map.c
16
src/map.c
|
@ -121,25 +121,25 @@ void map_render_by_layer(Game *game, int layer) {
|
|||
/* for all Layer (2 in the current configuration: Background is layer 0 and
|
||||
* foreground is layer 1 ) */
|
||||
/* x and y will contain the position in the loop. */
|
||||
unsigned char x, y;
|
||||
int x, y;
|
||||
/* The positions where we start drawing the tiles will be in tx and
|
||||
* ty. */
|
||||
unsigned short int tx, ty;
|
||||
int tx, ty;
|
||||
/* mx and my will contain how many pixels will be hidden on x and on
|
||||
* y. */
|
||||
unsigned char mx, my;
|
||||
int mx, my;
|
||||
/* dw and dh contain the amount of tiles that will be drawn on x and on
|
||||
* y. */
|
||||
unsigned char dw = DWIDTH / T_WIDTH + 2, dh = DHEIGHT / T_HEIGHT + 1;
|
||||
int dw = DWIDTH / T_WIDTH + 2, dh = DHEIGHT / T_HEIGHT + 1;
|
||||
/* mw and mh will contain the height and the width of the map. */
|
||||
unsigned short int mw = map_level->w * T_WIDTH,
|
||||
int mw = map_level->w * T_WIDTH,
|
||||
mh = map_level->h * T_HEIGHT;
|
||||
/* tile contains the tile to draw. */
|
||||
short int tile;
|
||||
unsigned short int tile;
|
||||
/* The position where I start drawing */
|
||||
unsigned short int sx, sy;
|
||||
int sx, sy;
|
||||
/* The position of the tile in the tileset. */
|
||||
unsigned short int xtile, ytile;
|
||||
int xtile, ytile;
|
||||
/* Fix sx. */
|
||||
if(player->x < DWIDTH / 2) {
|
||||
/* If I can't center the player because I'm near the left border of
|
||||
|
|
|
@ -88,6 +88,8 @@ void player_move(Game *game, Direction direction) {
|
|||
}
|
||||
|
||||
/* Check if we should change map */
|
||||
/* Disable map change for indoor maps */
|
||||
if(!game->map_level->indoor){
|
||||
Map *target = map_get_for_tile(game,
|
||||
game->map_level->x + player->x / T_WIDTH +
|
||||
one_px_mov[direction * 2],
|
||||
|
@ -111,6 +113,7 @@ void player_move(Game *game, Direction direction) {
|
|||
game->map_level = target;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void player_action(Game *game) {
|
||||
/* already doing something, or can't do anything*/
|
||||
|
|
Loading…
Add table
Reference in a new issue