From 5c1667b41a7d31df6d405d272833895bf8472cf6 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Tue, 29 Jan 2019 16:55:25 -0600 Subject: Define layout constants --- data/maps/UnionRoom/events.inc | 6 +++--- data/maps/UnionRoom/header.inc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'data/maps/UnionRoom') diff --git a/data/maps/UnionRoom/events.inc b/data/maps/UnionRoom/events.inc index 3ab614468..c78b86eec 100644 --- a/data/maps/UnionRoom/events.inc +++ b/data/maps/UnionRoom/events.inc @@ -1,4 +1,4 @@ -UnionRoom_EventObjects: @ 853B020 +UnionRoom_EventObjects: object_event 1, EVENT_OBJ_GFX_UNION_ROOM_NURSE, 0, 3, 2, 3, MOVEMENT_TYPE_FACE_DOWN, 0, 0, 0, 0, UnionRoom_EventScript_23D236, 0 object_event 2, EVENT_OBJ_GFX_VAR_3, 0, 1, 8, 3, MOVEMENT_TYPE_WANDER_AROUND, 1, 1, 0, 0, UnionRoom_EventScript_23D204, FLAG_HIDE_UNION_ROOM_PLAYER_4 object_event 3, EVENT_OBJ_GFX_VAR_7, 0, 7, 8, 3, MOVEMENT_TYPE_WANDER_AROUND, 1, 1, 0, 0, UnionRoom_EventScript_23D22C, FLAG_HIDE_UNION_ROOM_PLAYER_8 @@ -9,10 +9,10 @@ UnionRoom_EventObjects: @ 853B020 object_event 8, EVENT_OBJ_GFX_VAR_1, 0, 13, 8, 3, MOVEMENT_TYPE_WANDER_AROUND, 1, 1, 0, 0, UnionRoom_EventScript_23D1F0, FLAG_HIDE_UNION_ROOM_PLAYER_2 object_event 9, EVENT_OBJ_GFX_VAR_0, 0, 4, 6, 3, MOVEMENT_TYPE_WANDER_AROUND, 1, 1, 0, 0, UnionRoom_EventScript_23D1E6, FLAG_HIDE_UNION_ROOM_PLAYER_1 -UnionRoom_MapWarps: @ 853B0F8 +UnionRoom_MapWarps: warp_def 7, 11, 3, 127, MAP_NONE warp_def 8, 11, 3, 127, MAP_NONE -UnionRoom_MapEvents:: @ 853B108 +UnionRoom_MapEvents:: map_events UnionRoom_EventObjects, UnionRoom_MapWarps, 0x0, 0x0 diff --git a/data/maps/UnionRoom/header.inc b/data/maps/UnionRoom/header.inc index 29fd3cc3f..cc7e1c3d1 100644 --- a/data/maps/UnionRoom/header.inc +++ b/data/maps/UnionRoom/header.inc @@ -1,10 +1,10 @@ -UnionRoom: @ 8485120 +UnionRoom: .4byte UnionRoom_Layout .4byte UnionRoom_MapEvents .4byte UnionRoom_MapScripts .4byte 0x0 .2byte MUS_RAINBOW - .2byte 393 + .2byte LAYOUT_UNION_ROOM .byte MAPSEC_DYNAMIC .byte 0 .byte WEATHER_NONE -- cgit v1.2.3 From 29d6221935d3e8e01dc11b4023ba977ff433f3c9 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Thu, 31 Jan 2019 15:51:20 -0600 Subject: Convert map data to JSON --- data/maps/UnionRoom/events.inc | 18 ----- data/maps/UnionRoom/header.inc | 15 ---- data/maps/UnionRoom/map.json | 153 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+), 33 deletions(-) delete mode 100644 data/maps/UnionRoom/events.inc delete mode 100644 data/maps/UnionRoom/header.inc create mode 100644 data/maps/UnionRoom/map.json (limited to 'data/maps/UnionRoom') diff --git a/data/maps/UnionRoom/events.inc b/data/maps/UnionRoom/events.inc deleted file mode 100644 index c78b86eec..000000000 --- a/data/maps/UnionRoom/events.inc +++ /dev/null @@ -1,18 +0,0 @@ -UnionRoom_EventObjects: - object_event 1, EVENT_OBJ_GFX_UNION_ROOM_NURSE, 0, 3, 2, 3, MOVEMENT_TYPE_FACE_DOWN, 0, 0, 0, 0, UnionRoom_EventScript_23D236, 0 - object_event 2, EVENT_OBJ_GFX_VAR_3, 0, 1, 8, 3, MOVEMENT_TYPE_WANDER_AROUND, 1, 1, 0, 0, UnionRoom_EventScript_23D204, FLAG_HIDE_UNION_ROOM_PLAYER_4 - object_event 3, EVENT_OBJ_GFX_VAR_7, 0, 7, 8, 3, MOVEMENT_TYPE_WANDER_AROUND, 1, 1, 0, 0, UnionRoom_EventScript_23D22C, FLAG_HIDE_UNION_ROOM_PLAYER_8 - object_event 4, EVENT_OBJ_GFX_VAR_6, 0, 1, 4, 3, MOVEMENT_TYPE_WANDER_AROUND, 1, 1, 0, 0, UnionRoom_EventScript_23D222, FLAG_HIDE_UNION_ROOM_PLAYER_7 - object_event 5, EVENT_OBJ_GFX_VAR_5, 0, 7, 4, 3, MOVEMENT_TYPE_WANDER_AROUND, 1, 1, 0, 0, UnionRoom_EventScript_23D218, FLAG_HIDE_UNION_ROOM_PLAYER_6 - object_event 6, EVENT_OBJ_GFX_VAR_4, 0, 13, 4, 3, MOVEMENT_TYPE_WANDER_AROUND, 1, 1, 0, 0, UnionRoom_EventScript_23D20E, FLAG_HIDE_UNION_ROOM_PLAYER_5 - object_event 7, EVENT_OBJ_GFX_VAR_2, 0, 10, 6, 3, MOVEMENT_TYPE_WANDER_AROUND, 1, 1, 0, 0, UnionRoom_EventScript_23D1FA, FLAG_HIDE_UNION_ROOM_PLAYER_3 - object_event 8, EVENT_OBJ_GFX_VAR_1, 0, 13, 8, 3, MOVEMENT_TYPE_WANDER_AROUND, 1, 1, 0, 0, UnionRoom_EventScript_23D1F0, FLAG_HIDE_UNION_ROOM_PLAYER_2 - object_event 9, EVENT_OBJ_GFX_VAR_0, 0, 4, 6, 3, MOVEMENT_TYPE_WANDER_AROUND, 1, 1, 0, 0, UnionRoom_EventScript_23D1E6, FLAG_HIDE_UNION_ROOM_PLAYER_1 - -UnionRoom_MapWarps: - warp_def 7, 11, 3, 127, MAP_NONE - warp_def 8, 11, 3, 127, MAP_NONE - -UnionRoom_MapEvents:: - map_events UnionRoom_EventObjects, UnionRoom_MapWarps, 0x0, 0x0 - diff --git a/data/maps/UnionRoom/header.inc b/data/maps/UnionRoom/header.inc deleted file mode 100644 index cc7e1c3d1..000000000 --- a/data/maps/UnionRoom/header.inc +++ /dev/null @@ -1,15 +0,0 @@ -UnionRoom: - .4byte UnionRoom_Layout - .4byte UnionRoom_MapEvents - .4byte UnionRoom_MapScripts - .4byte 0x0 - .2byte MUS_RAINBOW - .2byte LAYOUT_UNION_ROOM - .byte MAPSEC_DYNAMIC - .byte 0 - .byte WEATHER_NONE - .byte MAP_TYPE_INDOOR - .2byte 0 - map_header_flags allow_bike=0, allow_escape_rope=0, allow_run=0, show_map_name=0 - .byte MAP_BATTLE_SCENE_FRONTIER - diff --git a/data/maps/UnionRoom/map.json b/data/maps/UnionRoom/map.json new file mode 100644 index 000000000..175ec3ad7 --- /dev/null +++ b/data/maps/UnionRoom/map.json @@ -0,0 +1,153 @@ +{ + "id": "MAP_UNION_ROOM", + "name": "UnionRoom", + "layout": "LAYOUT_UNION_ROOM", + "music": "MUS_RAINBOW", + "region_map_section": "MAPSEC_DYNAMIC", + "requires_flash": false, + "weather": "WEATHER_NONE", + "map_type": "MAP_TYPE_INDOOR", + "allow_bike": false, + "allow_escape_rope": false, + "allow_running": false, + "show_map_name": false, + "battle_scene": "MAP_BATTLE_SCENE_FRONTIER", + "connections": null, + "object_events": [ + { + "graphics_id": "EVENT_OBJ_GFX_UNION_ROOM_NURSE", + "x": 3, + "y": 2, + "elevation": 3, + "movement_type": "MOVEMENT_TYPE_FACE_DOWN", + "movement_range_x": 0, + "movement_range_y": 0, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "UnionRoom_EventScript_23D236", + "flag": "0" + }, + { + "graphics_id": "EVENT_OBJ_GFX_VAR_3", + "x": 1, + "y": 8, + "elevation": 3, + "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "UnionRoom_EventScript_23D204", + "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_4" + }, + { + "graphics_id": "EVENT_OBJ_GFX_VAR_7", + "x": 7, + "y": 8, + "elevation": 3, + "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "UnionRoom_EventScript_23D22C", + "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_8" + }, + { + "graphics_id": "EVENT_OBJ_GFX_VAR_6", + "x": 1, + "y": 4, + "elevation": 3, + "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "UnionRoom_EventScript_23D222", + "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_7" + }, + { + "graphics_id": "EVENT_OBJ_GFX_VAR_5", + "x": 7, + "y": 4, + "elevation": 3, + "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "UnionRoom_EventScript_23D218", + "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_6" + }, + { + "graphics_id": "EVENT_OBJ_GFX_VAR_4", + "x": 13, + "y": 4, + "elevation": 3, + "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "UnionRoom_EventScript_23D20E", + "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_5" + }, + { + "graphics_id": "EVENT_OBJ_GFX_VAR_2", + "x": 10, + "y": 6, + "elevation": 3, + "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "UnionRoom_EventScript_23D1FA", + "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_3" + }, + { + "graphics_id": "EVENT_OBJ_GFX_VAR_1", + "x": 13, + "y": 8, + "elevation": 3, + "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "UnionRoom_EventScript_23D1F0", + "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_2" + }, + { + "graphics_id": "EVENT_OBJ_GFX_VAR_0", + "x": 4, + "y": 6, + "elevation": 3, + "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "UnionRoom_EventScript_23D1E6", + "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_1" + } + ], + "warp_events": [ + { + "x": 7, + "y": 11, + "elevation": 3, + "dest_map": "MAP_NONE", + "dest_warp_id": 127 + }, + { + "x": 8, + "y": 11, + "elevation": 3, + "dest_map": "MAP_NONE", + "dest_warp_id": 127 + } + ], + "coord_events": [], + "bg_events": [] +} \ No newline at end of file -- cgit v1.2.3 From 19b76bffda07d8878c1ff1a9005e1b57c549ffce Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 16 Feb 2019 16:40:31 -0600 Subject: Use strings for map json trainer_type and trainer_sight_or_berry_tree_id fields --- data/maps/UnionRoom/map.json | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'data/maps/UnionRoom') diff --git a/data/maps/UnionRoom/map.json b/data/maps/UnionRoom/map.json index 175ec3ad7..c42cd362c 100644 --- a/data/maps/UnionRoom/map.json +++ b/data/maps/UnionRoom/map.json @@ -22,8 +22,8 @@ "movement_type": "MOVEMENT_TYPE_FACE_DOWN", "movement_range_x": 0, "movement_range_y": 0, - "trainer_type": 0, - "trainer_sight_or_berry_tree_id": 0, + "trainer_type": "0", + "trainer_sight_or_berry_tree_id": "0", "script": "UnionRoom_EventScript_23D236", "flag": "0" }, @@ -35,8 +35,8 @@ "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", "movement_range_x": 1, "movement_range_y": 1, - "trainer_type": 0, - "trainer_sight_or_berry_tree_id": 0, + "trainer_type": "0", + "trainer_sight_or_berry_tree_id": "0", "script": "UnionRoom_EventScript_23D204", "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_4" }, @@ -48,8 +48,8 @@ "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", "movement_range_x": 1, "movement_range_y": 1, - "trainer_type": 0, - "trainer_sight_or_berry_tree_id": 0, + "trainer_type": "0", + "trainer_sight_or_berry_tree_id": "0", "script": "UnionRoom_EventScript_23D22C", "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_8" }, @@ -61,8 +61,8 @@ "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", "movement_range_x": 1, "movement_range_y": 1, - "trainer_type": 0, - "trainer_sight_or_berry_tree_id": 0, + "trainer_type": "0", + "trainer_sight_or_berry_tree_id": "0", "script": "UnionRoom_EventScript_23D222", "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_7" }, @@ -74,8 +74,8 @@ "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", "movement_range_x": 1, "movement_range_y": 1, - "trainer_type": 0, - "trainer_sight_or_berry_tree_id": 0, + "trainer_type": "0", + "trainer_sight_or_berry_tree_id": "0", "script": "UnionRoom_EventScript_23D218", "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_6" }, @@ -87,8 +87,8 @@ "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", "movement_range_x": 1, "movement_range_y": 1, - "trainer_type": 0, - "trainer_sight_or_berry_tree_id": 0, + "trainer_type": "0", + "trainer_sight_or_berry_tree_id": "0", "script": "UnionRoom_EventScript_23D20E", "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_5" }, @@ -100,8 +100,8 @@ "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", "movement_range_x": 1, "movement_range_y": 1, - "trainer_type": 0, - "trainer_sight_or_berry_tree_id": 0, + "trainer_type": "0", + "trainer_sight_or_berry_tree_id": "0", "script": "UnionRoom_EventScript_23D1FA", "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_3" }, @@ -113,8 +113,8 @@ "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", "movement_range_x": 1, "movement_range_y": 1, - "trainer_type": 0, - "trainer_sight_or_berry_tree_id": 0, + "trainer_type": "0", + "trainer_sight_or_berry_tree_id": "0", "script": "UnionRoom_EventScript_23D1F0", "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_2" }, @@ -126,8 +126,8 @@ "movement_type": "MOVEMENT_TYPE_WANDER_AROUND", "movement_range_x": 1, "movement_range_y": 1, - "trainer_type": 0, - "trainer_sight_or_berry_tree_id": 0, + "trainer_type": "0", + "trainer_sight_or_berry_tree_id": "0", "script": "UnionRoom_EventScript_23D1E6", "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_1" } -- cgit v1.2.3 From 8816aa527d7f3adfa10988ac661b9842bf78e64b Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Fri, 22 Feb 2019 02:28:32 -0500 Subject: Update map script files --- data/maps/UnionRoom/scripts.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/maps/UnionRoom') diff --git a/data/maps/UnionRoom/scripts.inc b/data/maps/UnionRoom/scripts.inc index f71c40e3d..0871ae033 100644 --- a/data/maps/UnionRoom/scripts.inc +++ b/data/maps/UnionRoom/scripts.inc @@ -1,6 +1,6 @@ UnionRoom_MapScripts:: @ 823D1A6 - map_script 5, UnionRoom_MapScript1_23D1B1 - map_script 3, UnionRoom_MapScript1_23D1E5 + map_script MAP_SCRIPT_ON_RESUME, UnionRoom_MapScript1_23D1B1 + map_script MAP_SCRIPT_ON_TRANSITION, UnionRoom_MapScript1_23D1E5 .byte 0 UnionRoom_MapScript1_23D1B1: @ 823D1B1 -- cgit v1.2.3