From dc4b6670cae0545de36b609a500e77751c0e383c Mon Sep 17 00:00:00 2001 From: Rachel Date: Sat, 9 Nov 2024 17:13:44 -0800 Subject: [PATCH] Create constants for tile behaviors and normalize names --- Makefile | 2 +- include/constants/field/map_tile_behaviors.h | 270 ++++++ include/map_tile_behavior.h | 60 +- src/map_object_move.c | 26 +- src/map_tile_behavior.c | 830 +++++++++---------- src/overlay005/field_control.c | 32 +- src/overlay005/ov5_021E1154.c | 16 +- src/overlay005/ov5_021F61BC.c | 8 +- src/overlay008/ov8_02249960.c | 6 +- src/overlay009/ov9_02249960.c | 2 +- src/unk_02054D00.c | 4 +- src/unk_02056B30.c | 4 +- src/unk_0205F180.c | 18 +- 13 files changed, 773 insertions(+), 505 deletions(-) create mode 100644 include/constants/field/map_tile_behaviors.h diff --git a/Makefile b/Makefile index 0b3b99fd2..8d6fed570 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ target: $(BUILD)/build.ninja $(MESON) compile -C $(BUILD) $(MESON_TARGET) format: $(BUILD)/build.ninja - $(MESON) compile -C $(BUILD) clang-format + $(NINJA) -C $(BUILD) clang-format clean: $(BUILD)/build.ninja $(MESON) compile -C $(BUILD) --clean diff --git a/include/constants/field/map_tile_behaviors.h b/include/constants/field/map_tile_behaviors.h new file mode 100644 index 000000000..c26e4c3da --- /dev/null +++ b/include/constants/field/map_tile_behaviors.h @@ -0,0 +1,270 @@ +#ifndef POKEPLATINUM_CONSTANTS_MAP_TILE_BEHAVIORS_H +#define POKEPLATINUM_CONSTANTS_MAP_TILE_BEHAVIORS_H + +#define TILE_BEHAVIOR_FLAG_NONE 0 +#define TILE_BEHAVIOR_FLAG_SURFABLE (1 << 0) +#define TILE_BEHAVIOR_FLAG_ENCOUNTER (1 << 1) + +#define TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER (TILE_BEHAVIOR_FLAG_ENCOUNTER | TILE_BEHAVIOR_FLAG_SURFABLE) + +enum TileBehavior { + TILE_BEHAVIOR_NONE = 0, + TILE_BEHAVIOR_UNUSED_x01, + TILE_BEHAVIOR_TALL_GRASS, + TILE_BEHAVIOR_VERY_TALL_GRASS, + TILE_BEHAVIOR_UNUSED_x04, + TILE_BEHAVIOR_UNUSED_x05, + TILE_BEHAVIOR_UNUSED_x06, + TILE_BEHAVIOR_UNUSED_x07, + TILE_BEHAVIOR_CAVE_FLOOR, + TILE_BEHAVIOR_UNUSED_x09, + TILE_BEHAVIOR_UNUSED_x0A, + TILE_BEHAVIOR_OLD_CHATEAU_FLOOR, + TILE_BEHAVIOR_MOUNTAIN_FLOOR, + TILE_BEHAVIOR_UNUSED_x0D, + TILE_BEHAVIOR_UNUSED_x0E, + TILE_BEHAVIOR_UNUSED_x0F, + TILE_BEHAVIOR_WATER_RIVER, + TILE_BEHAVIOR_UNUSED_x11, + TILE_BEHAVIOR_UNUSED_x12, + TILE_BEHAVIOR_WATERFALL, + TILE_BEHAVIOR_UNUSED_x14, + TILE_BEHAVIOR_WATER_SEA, + TILE_BEHAVIOR_PUDDLE, + TILE_BEHAVIOR_SHALLOW_WATER, + TILE_BEHAVIOR_UNUSED_x18, + TILE_BEHAVIOR_UNUSED_x19, + TILE_BEHAVIOR_UNUSED_x1A, + TILE_BEHAVIOR_UNUSED_x1B, + TILE_BEHAVIOR_UNUSED_x1C, + TILE_BEHAVIOR_PUDDLE_NO_SPLASHING, + TILE_BEHAVIOR_UNUSED_x1E, + TILE_BEHAVIOR_UNUSED_x1F, + TILE_BEHAVIOR_ICE, + TILE_BEHAVIOR_SAND, + TILE_BEHAVIOR_UNUSED_x22, + TILE_BEHAVIOR_UNUSED_x23, + TILE_BEHAVIOR_UNUSED_x24, + TILE_BEHAVIOR_UNUSED_x25, + TILE_BEHAVIOR_UNUSED_x26, + TILE_BEHAVIOR_UNUSED_x27, + TILE_BEHAVIOR_UNUSED_x28, + TILE_BEHAVIOR_UNUSED_x29, + TILE_BEHAVIOR_UNUSED_x2A, + TILE_BEHAVIOR_UNUSED_x2B, + TILE_BEHAVIOR_REFLECTIVE, + TILE_BEHAVIOR_FORBIDS_EXPLORATION_KIT, + TILE_BEHAVIOR_UNUSED_x2E, + TILE_BEHAVIOR_UNUSED_x2F, + TILE_BEHAVIOR_BLOCK_EASTWARD, + TILE_BEHAVIOR_BLOCK_WESTWARD, + TILE_BEHAVIOR_BLOCK_NORTHWARD, + TILE_BEHAVIOR_BLOCK_SOUTHWARD, + TILE_BEHAVIOR_BLOCK_NORTH_AND_EAST, + TILE_BEHAVIOR_BLOCK_NORTH_AND_WEST, + TILE_BEHAVIOR_BLOCK_SOUTH_AND_EAST, + TILE_BEHAVIOR_BLOCK_SOUTH_AND_WEST, + TILE_BEHAVIOR_JUMP_EAST, + TILE_BEHAVIOR_JUMP_WEST, + TILE_BEHAVIOR_JUMP_NORTH, + TILE_BEHAVIOR_JUMP_SOUTH, + TILE_BEHAVIOR_UNKNOWN_x3C, + TILE_BEHAVIOR_UNKNOWN_x3D, + TILE_BEHAVIOR_UNKNOWN_x3E, + TILE_BEHAVIOR_UNKNOWN_x3F, + TILE_BEHAVIOR_SLIDE_EASTWARD, + TILE_BEHAVIOR_SLIDE_WESTWARD, + TILE_BEHAVIOR_SLIDE_NORTHWARD, + TILE_BEHAVIOR_SLIDE_SOUTHWARD, + TILE_BEHAVIOR_UNUSED_x44, + TILE_BEHAVIOR_UNUSED_x45, + TILE_BEHAVIOR_UNUSED_x46, + TILE_BEHAVIOR_UNUSED_x47, + TILE_BEHAVIOR_UNUSED_x48, + TILE_BEHAVIOR_BLOCK_NORTH_AND_SOUTH, + TILE_BEHAVIOR_BLOCK_EAST_AND_WEST, + TILE_BEHAVIOR_ROCK_CLIMB_N_S, + TILE_BEHAVIOR_ROCK_CLIMB_E_W, + TILE_BEHAVIOR_UNUSED_x4D, + TILE_BEHAVIOR_UNUSED_x4E, + TILE_BEHAVIOR_UNUSED_x4F, + TILE_BEHAVIOR_UNUSED_x50, + TILE_BEHAVIOR_UNUSED_x51, + TILE_BEHAVIOR_UNUSED_x52, + TILE_BEHAVIOR_UNUSED_x53, + TILE_BEHAVIOR_UNUSED_x54, + TILE_BEHAVIOR_UNUSED_x55, + TILE_BEHAVIOR_PASTORIA_GYM_H_GROUND, + TILE_BEHAVIOR_PASTORIA_GYM_M_GROUND, + TILE_BEHAVIOR_PASTORIA_GYM_L_GROUND, + TILE_BEHAVIOR_PASTORIA_GYM_WATER, + TILE_BEHAVIOR_JUMP_NORTH_TWICE, + TILE_BEHAVIOR_JUMP_SOUTH_TWICE, + TILE_BEHAVIOR_JUMP_WEST_TWICE, + TILE_BEHAVIOR_JUMP_EAST_TWICE, + TILE_BEHAVIOR_WARP_STAIRS_EAST, + TILE_BEHAVIOR_WARP_STAIRS_WEST, + TILE_BEHAVIOR_UNKNOWN_x60, + TILE_BEHAVIOR_UNUSED_x61, + TILE_BEHAVIOR_WARP_ENTRANCE_EAST, + TILE_BEHAVIOR_WARP_ENTRANCE_WEST, + TILE_BEHAVIOR_WARP_ENTRANCE_NORTH, + TILE_BEHAVIOR_WARP_ENTRANCE_SOUTH, + TILE_BEHAVIOR_UNUSED_x66, + TILE_BEHAVIOR_WARP_PANEL, + TILE_BEHAVIOR_UNUSED_x68, + TILE_BEHAVIOR_DOOR, + TILE_BEHAVIOR_ESCALATOR_FLIP_FACE, + TILE_BEHAVIOR_ESCALATOR, + TILE_BEHAVIOR_WARP_EAST, + TILE_BEHAVIOR_WARP_WEST, + TILE_BEHAVIOR_WARP_NORTH, + TILE_BEHAVIOR_WARP_SOUTH, + TILE_BEHAVIOR_BRIDGE_START, + TILE_BEHAVIOR_BRIDGE, + TILE_BEHAVIOR_BRIDGE_OVER_CAVE, + TILE_BEHAVIOR_BRIDGE_OVER_WATER, + TILE_BEHAVIOR_BRIDGE_OVER_SAND, + TILE_BEHAVIOR_BRIDGE_OVER_SNOW, + TILE_BEHAVIOR_BIKE_BRIDGE_N_S, + TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_ENCS, + TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_WATER, + TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_SAND, + TILE_BEHAVIOR_BIKE_BRIDGE_E_W, + TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_ENCS, + TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_WATER, + TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_SAND, + TILE_BEHAVIOR_UNUSED_x7E, + TILE_BEHAVIOR_UNUSED_x7F, + TILE_BEHAVIOR_TABLE, + TILE_BEHAVIOR_UNUSED_x81, + TILE_BEHAVIOR_UNUSED_x82, + TILE_BEHAVIOR_PC, + TILE_BEHAVIOR_UNUSED_x84, + TILE_BEHAVIOR_TOWN_MAP, + TILE_BEHAVIOR_TV, + TILE_BEHAVIOR_UNUSED_x87, + TILE_BEHAVIOR_UNKNOWN_x88, + TILE_BEHAVIOR_UNUSED_x89, + TILE_BEHAVIOR_UNUSED_x8A, + TILE_BEHAVIOR_UNUSED_x8B, + TILE_BEHAVIOR_UNUSED_x8C, + TILE_BEHAVIOR_UNUSED_x8D, + TILE_BEHAVIOR_UNKNOWN_x8E, + TILE_BEHAVIOR_UNKNOWN_x8F, + TILE_BEHAVIOR_UNUSED_x90, + TILE_BEHAVIOR_UNUSED_x91, + TILE_BEHAVIOR_UNUSED_x92, + TILE_BEHAVIOR_UNUSED_x93, + TILE_BEHAVIOR_UNUSED_x94, + TILE_BEHAVIOR_UNUSED_x95, + TILE_BEHAVIOR_UNUSED_x96, + TILE_BEHAVIOR_UNUSED_x97, + TILE_BEHAVIOR_UNUSED_x98, + TILE_BEHAVIOR_UNUSED_x99, + TILE_BEHAVIOR_UNUSED_x9A, + TILE_BEHAVIOR_UNUSED_x9B, + TILE_BEHAVIOR_UNUSED_x9C, + TILE_BEHAVIOR_UNUSED_x9D, + TILE_BEHAVIOR_UNUSED_x9E, + TILE_BEHAVIOR_UNUSED_x9F, + TILE_BEHAVIOR_BERRY_PATCH, + TILE_BEHAVIOR_SNOW_DEEP, + TILE_BEHAVIOR_SNOW_DEEPER, + TILE_BEHAVIOR_SNOW_DEEPEST, + TILE_BEHAVIOR_MUD, + TILE_BEHAVIOR_MUD_DEEP, + TILE_BEHAVIOR_MUD_WITH_GRASS, + TILE_BEHAVIOR_MUD_DEEP_WITH_GRASS, + TILE_BEHAVIOR_SNOW_SHALLOW, + TILE_BEHAVIOR_SNOW_WITH_SHADOWS, + TILE_BEHAVIOR_UNUSED_xAA, + TILE_BEHAVIOR_UNUSED_xAB, + TILE_BEHAVIOR_UNUSED_xAC, + TILE_BEHAVIOR_UNUSED_xAD, + TILE_BEHAVIOR_UNUSED_xAE, + TILE_BEHAVIOR_UNUSED_xAF, + TILE_BEHAVIOR_UNUSED_xB0, + TILE_BEHAVIOR_UNUSED_xB1, + TILE_BEHAVIOR_UNUSED_xB2, + TILE_BEHAVIOR_UNUSED_xB3, + TILE_BEHAVIOR_UNUSED_xB4, + TILE_BEHAVIOR_UNUSED_xB5, + TILE_BEHAVIOR_UNUSED_xB6, + TILE_BEHAVIOR_UNUSED_xB7, + TILE_BEHAVIOR_UNUSED_xB8, + TILE_BEHAVIOR_UNUSED_xB9, + TILE_BEHAVIOR_UNUSED_xBA, + TILE_BEHAVIOR_UNUSED_xBB, + TILE_BEHAVIOR_UNUSED_xBC, + TILE_BEHAVIOR_UNUSED_xBD, + TILE_BEHAVIOR_UNUSED_xBE, + TILE_BEHAVIOR_UNUSED_xBF, + TILE_BEHAVIOR_UNUSED_xC0, + TILE_BEHAVIOR_UNUSED_xC1, + TILE_BEHAVIOR_UNUSED_xC2, + TILE_BEHAVIOR_UNUSED_xC3, + TILE_BEHAVIOR_UNUSED_xC4, + TILE_BEHAVIOR_UNUSED_xC5, + TILE_BEHAVIOR_UNUSED_xC6, + TILE_BEHAVIOR_UNUSED_xC7, + TILE_BEHAVIOR_UNUSED_xC8, + TILE_BEHAVIOR_UNUSED_xC9, + TILE_BEHAVIOR_UNUSED_xCA, + TILE_BEHAVIOR_UNUSED_xCB, + TILE_BEHAVIOR_UNUSED_xCC, + TILE_BEHAVIOR_UNUSED_xCD, + TILE_BEHAVIOR_UNUSED_xCE, + TILE_BEHAVIOR_UNUSED_xCF, + TILE_BEHAVIOR_UNUSED_xD0, + TILE_BEHAVIOR_UNUSED_xD1, + TILE_BEHAVIOR_UNUSED_xD2, + TILE_BEHAVIOR_UNUSED_xD3, + TILE_BEHAVIOR_UNUSED_xD4, + TILE_BEHAVIOR_UNUSED_xD5, + TILE_BEHAVIOR_UNUSED_xD6, + TILE_BEHAVIOR_BIKE_RAMP_EASTWARD, + TILE_BEHAVIOR_BIKE_RAMP_WESTWARD, + TILE_BEHAVIOR_BIKE_SLOPE_TOP, + TILE_BEHAVIOR_BIKE_SLOPE_BOTTOM, + TILE_BEHAVIOR_BIKE_PARKING, + TILE_BEHAVIOR_UNUSED_xDC, + TILE_BEHAVIOR_UNUSED_xDD, + TILE_BEHAVIOR_UNUSED_xDE, + TILE_BEHAVIOR_UNUSED_xDF, + TILE_BEHAVIOR_SMALL_BOOKSHELF_1, + TILE_BEHAVIOR_BOOKSHELF_1, + TILE_BEHAVIOR_BOOKSHELF_2, + TILE_BEHAVIOR_UNUSED_xE3, + TILE_BEHAVIOR_TRASH_CAN, + TILE_BEHAVIOR_MART_SHELF_1, + TILE_BEHAVIOR_UNUSED_xE6, + TILE_BEHAVIOR_UNUSED_xE7, + TILE_BEHAVIOR_UNUSED_xE8, + TILE_BEHAVIOR_UNUSED_xE9, + TILE_BEHAVIOR_SMALL_BOOKSHELF_2, + TILE_BEHAVIOR_MART_SHELF_2, + TILE_BEHAVIOR_MART_SHELF_3, + TILE_BEHAVIOR_UNUSED_xED, + TILE_BEHAVIOR_UNUSED_xEE, + TILE_BEHAVIOR_UNUSED_xEF, + TILE_BEHAVIOR_UNUSED_xF0, + TILE_BEHAVIOR_UNUSED_xF1, + TILE_BEHAVIOR_UNUSED_xF2, + TILE_BEHAVIOR_UNUSED_xF3, + TILE_BEHAVIOR_UNUSED_xF4, + TILE_BEHAVIOR_UNUSED_xF5, + TILE_BEHAVIOR_UNUSED_xF6, + TILE_BEHAVIOR_UNUSED_xF7, + TILE_BEHAVIOR_UNUSED_xF8, + TILE_BEHAVIOR_UNUSED_xF9, + TILE_BEHAVIOR_UNUSED_xFA, + TILE_BEHAVIOR_UNUSED_xFB, + TILE_BEHAVIOR_UNUSED_xFC, + TILE_BEHAVIOR_UNUSED_xFD, + TILE_BEHAVIOR_UNUSED_xFE, + + TILE_BEHAVIOR_MAX, +}; + +#endif // POKEPLATINUM_CONSTANTS_MAP_TILE_BEHAVIORS_H diff --git a/include/map_tile_behavior.h b/include/map_tile_behavior.h index bfdb6f3ae..c37124ae7 100644 --- a/include/map_tile_behavior.h +++ b/include/map_tile_behavior.h @@ -5,14 +5,14 @@ BOOL TileBehavior_IsTallGrass(u8 behavior); BOOL TileBehavior_IsVeryTallGrass(u8 behavior); BOOL TileBehavior_IsTable(u8 behavior); BOOL TileBehavior_IsDoor(u8 behavior); -BOOL TileBehavior_IsEastWarpEntrance(u8 behavior); -BOOL TileBehavior_IsWestWarpEntrance(u8 behavior); -BOOL TileBehavior_IsNorthWarpEntrance(u8 behavior); -BOOL TileBehavior_IsSouthWarpEntrance(u8 behavior); -BOOL TileBehavior_IsEastWarp(u8 behavior); -BOOL TileBehavior_IsWestWarp(u8 behavior); -BOOL TileBehavior_IsNorthWarp(u8 behavior); -BOOL TileBehavior_IsSouthWarp(u8 behavior); +BOOL TileBehavior_IsWarpEntranceEast(u8 behavior); +BOOL TileBehavior_IsWarpEntranceWest(u8 behavior); +BOOL TileBehavior_IsWarpEntranceNorth(u8 behavior); +BOOL TileBehavior_IsWarpEntranceSouth(u8 behavior); +BOOL TileBehavior_IsWarpEast(u8 behavior); +BOOL TileBehavior_IsWarpWest(u8 behavior); +BOOL TileBehavior_IsWarpNorth(u8 behavior); +BOOL TileBehavior_IsWarpSouth(u8 behavior); BOOL TileBehavior_IsSurfable(u8 behavior); BOOL TileBehavior_IsSand(u8 behavior); BOOL TileBehavior_IsShallowWater(u8 behavior); @@ -26,14 +26,14 @@ BOOL TileBehavior_IsJumpWestTwice(u8 behavior); BOOL TileBehavior_IsJumpEastTwice(u8 behavior); BOOL TileBehavior_IsPC(u8 behavior); BOOL TileBehavior_IsTownMap(u8 behavior); -BOOL TileBehavior_IsPastoriaGymWaterLevel1(u8 behavior); -BOOL TileBehavior_IsPastoriaGymWaterLevel2(u8 behavior); -BOOL TileBehavior_IsPastoriaGymWaterLevel3(u8 behavior); -BOOL TileBehavior_IsPastoriaGymWaterEmpty(u8 behavior); -BOOL TileBehavior_IsEscalatorInvertPlayerFace(u8 behavior); +BOOL TileBehavior_IsPastoriaGymHighGround(u8 behavior); +BOOL TileBehavior_IsPastoriaGymMiddleGround(u8 behavior); +BOOL TileBehavior_IsPastoriaGymLowGround(u8 behavior); +BOOL TileBehavior_IsPastoriaGymWater(u8 behavior); +BOOL TileBehavior_IsEscalatorFlipFace(u8 behavior); BOOL TileBehavior_IsEscalator(u8 behavior); -BOOL TileBehavior_IsEastStairsWarp(u8 behavior); -BOOL TileBehavior_IsWestStairsWarp(u8 behavior); +BOOL TileBehavior_IsWarpStairsEast(u8 behavior); +BOOL TileBehavior_IsWarpStairsWest(u8 behavior); BOOL TileBehavior_IsIce(u8 behavior); BOOL TileBehavior_IsRockClimbNorthSouth(u8 behavior); BOOL TileBehavior_IsRockClimbEastWest(u8 behavior); @@ -42,9 +42,9 @@ BOOL TileBehavior_IsSmallBookshelf2(u8 behavior); BOOL TileBehavior_IsBookshelf1(u8 behavior); BOOL TileBehavior_IsBookshelf2(u8 behavior); BOOL TileBehavior_IsTrashCan(u8 behavior); -BOOL TileBehavior_IsStoreShelf1(u8 behavior); -BOOL TileBehavior_IsStoreShelf2(u8 behavior); -BOOL TileBehavior_IsStoreShelf3(u8 behavior); +BOOL TileBehavior_IsMartShelf1(u8 behavior); +BOOL TileBehavior_IsMartShelf2(u8 behavior); +BOOL TileBehavior_IsMartShelf3(u8 behavior); BOOL TileBehavior_IsMud(u8 behavior); BOOL TileBehavior_IsDeepMud(u8 behavior); BOOL TileBehavior_IsMudWithGrass(u8 behavior); @@ -57,23 +57,23 @@ BOOL TileBehavior_IsDeepestSnow(u8 behavior); BOOL TileBehavior_IsBikeSlope(u8 behavior); BOOL TileBehavior_IsBikeSlopeTop(u8 behavior); BOOL TileBehavior_IsBikeSlopeBottom(u8 behavior); -BOOL TileBehavior_IsBikeRampWestToEast(u8 behavior); -BOOL TileBehavior_IsBikeRampEastToWest(u8 behavior); +BOOL TileBehavior_IsBikeRampEastward(u8 behavior); +BOOL TileBehavior_IsBikeRampWestward(u8 behavior); BOOL TileBehavior_IsCaveFloor(u8 behavior); BOOL TileBehavior_IsWaterfall(u8 behavior); BOOL TileBehavior_IsBikeParking(u8 behavior); -BOOL TileBehavior_BlocksMovementNorth(u8 behavior); -BOOL TileBehavior_BlocksMovementSouth(u8 behavior); -BOOL TileBehavior_BlocksMovementWest(u8 behavior); -BOOL TileBehavior_BlocksMovementEast(u8 behavior); +BOOL TileBehavior_BlocksMovementNorthward(u8 behavior); +BOOL TileBehavior_BlocksMovementSouthward(u8 behavior); +BOOL TileBehavior_BlocksMovementWestward(u8 behavior); +BOOL TileBehavior_BlocksMovementEastward(u8 behavior); BOOL TileBehavior_IsPuddle(u8 behavior); BOOL TileBehavior_HasEncounters(u8 behavior); BOOL TileBehavior_IsTV(u8 behavior); BOOL TileBehavior_HasReflectiveSurface(u8 behavior); -BOOL TileBehavior_IsEastSlide(u8 behavior); -BOOL TileBehavior_IsWestSlide(u8 behavior); -BOOL TileBehavior_IsNorthSlide(u8 behavior); -BOOL TileBehavior_IsSouthSlide(u8 behavior); +BOOL TileBehavior_IsSlideEastward(u8 behavior); +BOOL TileBehavior_IsSlideWestward(u8 behavior); +BOOL TileBehavior_IsSlideNorthward(u8 behavior); +BOOL TileBehavior_IsSlideSouthward(u8 behavior); BOOL TileBehavior_IsWarpPanel(u8 behavior); BOOL TileBehavior_IsBridgeStart(u8 behavior); BOOL TileBehavior_IsBridge(u8 behavior); @@ -82,11 +82,11 @@ BOOL TileBehavior_IsBridgeOverSand(u8 behavior); BOOL TileBehavior_IsBridgeOverSnow(u8 behavior); BOOL TileBehavior_IsBikeBridgeNorthSouth(u8 behavior); BOOL TileBehavior_IsBikeBridgeEastWest(u8 behavior); -BOOL TileBehavior_HasNoAttributes(u8 behavior); +BOOL TileBehavior_IsNull(u8 behavior); BOOL TileBehavior_IsReflective(u8 behavior); BOOL TileBehavior_IsSnowWithShadows(u8 behavior); BOOL TileBehavior_ForbidsExplorationKit(u8 behavior); -u8 GetNoTileAttributesID(void); +u8 GetNullTileBehaviorID(void); #endif // POKEPLATINUM_TILE_BEHAVIOR_H diff --git a/src/map_object_move.c b/src/map_object_move.c index 353df2075..63874fd6a 100644 --- a/src/map_object_move.c +++ b/src/map_object_move.c @@ -486,7 +486,7 @@ static void sub_02063D30(MapObject *mapObj, u8 param1, u8 param2, const UnkStruc } if (sub_02062F64(mapObj) == 0) { - u8 v0 = GetNoTileAttributesID(); + u8 v0 = GetNullTileBehaviorID(); if (TileBehavior_HasReflectiveSurface(param1) == 1) { v0 = param1; @@ -498,7 +498,7 @@ static void sub_02063D30(MapObject *mapObj, u8 param1, u8 param2, const UnkStruc } } - if (v0 != GetNoTileAttributesID()) { + if (v0 != GetNullTileBehaviorID()) { int v2; sub_02062F48(mapObj, 1); @@ -690,7 +690,7 @@ int sub_02064004(const MapObject *mapObj, int param1, int param2, int param3) u8 v1 = sub_02062BE8(mapObj); u8 v2 = FieldSystem_GetTileBehavior(fieldSystem, param1, param2); - if (v2 == GetNoTileAttributesID()) { + if (v2 == GetNullTileBehaviorID()) { return 1; } @@ -703,17 +703,17 @@ int sub_02064004(const MapObject *mapObj, int param1, int param2, int param3) } static BOOL (*const Unk_020EE76C[4])(u8) = { - TileBehavior_BlocksMovementNorth, - TileBehavior_BlocksMovementSouth, - TileBehavior_BlocksMovementWest, - TileBehavior_BlocksMovementEast + TileBehavior_BlocksMovementNorthward, + TileBehavior_BlocksMovementSouthward, + TileBehavior_BlocksMovementWestward, + TileBehavior_BlocksMovementEastward }; static BOOL (*const Unk_020EE77C[4])(u8) = { - TileBehavior_BlocksMovementSouth, - TileBehavior_BlocksMovementNorth, - TileBehavior_BlocksMovementEast, - TileBehavior_BlocksMovementWest + TileBehavior_BlocksMovementSouthward, + TileBehavior_BlocksMovementNorthward, + TileBehavior_BlocksMovementEastward, + TileBehavior_BlocksMovementWestward }; int sub_0206406C(MapObject *mapObj, u32 param1) @@ -929,7 +929,7 @@ int sub_020642F8(MapObject *mapObj) int sub_02064390(MapObject *mapObj) { - u8 v0 = GetNoTileAttributesID(); + u8 v0 = GetNullTileBehaviorID(); u8 v1 = v0; if (sub_02062FDC(mapObj) == 0) { @@ -946,7 +946,7 @@ int sub_02064390(MapObject *mapObj) sub_02062BF0(mapObj, v0); sub_02062BE0(mapObj, v1); - if (TileBehavior_HasNoAttributes(v1) == 1) { + if (TileBehavior_IsNull(v1) == 1) { MapObject_SetStatusFlagOn(mapObj, MAP_OBJ_STATUS_11); return 0; } diff --git a/src/map_tile_behavior.c b/src/map_tile_behavior.c index 7d4a8917b..66426a271 100644 --- a/src/map_tile_behavior.c +++ b/src/map_tile_behavior.c @@ -1,613 +1,611 @@ #include "map_tile_behavior.h" -#define TILE_BEHAVIOR_FLAG_NONE 0 -#define TILE_BEHAVIOR_FLAG_SURFABLE (1 << 0) -#define TILE_BEHAVIOR_FLAG_ENCOUNTER (1 << 1) - -#define TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER (TILE_BEHAVIOR_FLAG_ENCOUNTER | TILE_BEHAVIOR_FLAG_SURFABLE) +#include "constants/field/map_tile_behaviors.h" +// clang-format off static const u8 sTileBehaviorFlags[] = { - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_ENCOUNTER, - TILE_BEHAVIOR_FLAG_ENCOUNTER, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_ENCOUNTER, - TILE_BEHAVIOR_FLAG_ENCOUNTER, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_ENCOUNTER, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_ENCOUNTER, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER, - TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER, - TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER, - TILE_BEHAVIOR_FLAG_SURFABLE, - TILE_BEHAVIOR_FLAG_SURFABLE, - TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_SURFABLE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_ENCOUNTER, - TILE_BEHAVIOR_FLAG_ENCOUNTER, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_SURFABLE, - TILE_BEHAVIOR_FLAG_SURFABLE, - TILE_BEHAVIOR_FLAG_SURFABLE, - TILE_BEHAVIOR_FLAG_SURFABLE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_ENCOUNTER, - TILE_BEHAVIOR_FLAG_SURFABLE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_ENCOUNTER, - TILE_BEHAVIOR_FLAG_SURFABLE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_ENCOUNTER, - TILE_BEHAVIOR_FLAG_SURFABLE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_ENCOUNTER, - TILE_BEHAVIOR_FLAG_ENCOUNTER, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE, - TILE_BEHAVIOR_FLAG_NONE + [TILE_BEHAVIOR_NONE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x01] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_TALL_GRASS] = TILE_BEHAVIOR_FLAG_ENCOUNTER, + [TILE_BEHAVIOR_VERY_TALL_GRASS] = TILE_BEHAVIOR_FLAG_ENCOUNTER, + [TILE_BEHAVIOR_UNUSED_x04] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x05] = TILE_BEHAVIOR_FLAG_ENCOUNTER, + [TILE_BEHAVIOR_UNUSED_x06] = TILE_BEHAVIOR_FLAG_ENCOUNTER, + [TILE_BEHAVIOR_UNUSED_x07] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_CAVE_FLOOR] = TILE_BEHAVIOR_FLAG_ENCOUNTER, + [TILE_BEHAVIOR_UNUSED_x09] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x0A] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_OLD_CHATEAU_FLOOR] = TILE_BEHAVIOR_FLAG_ENCOUNTER, + [TILE_BEHAVIOR_MOUNTAIN_FLOOR] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x0D] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x0E] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x0F] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_WATER_RIVER] = TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER, + [TILE_BEHAVIOR_UNUSED_x11] = TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER, + [TILE_BEHAVIOR_UNUSED_x12] = TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER, + [TILE_BEHAVIOR_WATERFALL] = TILE_BEHAVIOR_FLAG_SURFABLE, + [TILE_BEHAVIOR_UNUSED_x14] = TILE_BEHAVIOR_FLAG_SURFABLE, + [TILE_BEHAVIOR_WATER_SEA] = TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER, + [TILE_BEHAVIOR_PUDDLE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_SHALLOW_WATER] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x18] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x19] = TILE_BEHAVIOR_FLAG_SURFABLE, + [TILE_BEHAVIOR_UNUSED_x1A] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x1B] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x1C] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_PUDDLE_NO_SPLASHING] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x1E] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x1F] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_ICE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_SAND] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x22] = TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER, + [TILE_BEHAVIOR_UNUSED_x23] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x24] = TILE_BEHAVIOR_FLAG_ENCOUNTER, + [TILE_BEHAVIOR_UNUSED_x25] = TILE_BEHAVIOR_FLAG_ENCOUNTER, + [TILE_BEHAVIOR_UNUSED_x26] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x27] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x28] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x29] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x2A] = TILE_BEHAVIOR_FLAG_SURFABLE_ENCOUNTER, + [TILE_BEHAVIOR_UNUSED_x2B] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_REFLECTIVE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_FORBIDS_EXPLORATION_KIT] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x2E] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x2F] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BLOCK_EASTWARD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BLOCK_WESTWARD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BLOCK_NORTHWARD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BLOCK_SOUTHWARD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BLOCK_NORTH_AND_EAST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BLOCK_NORTH_AND_WEST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BLOCK_SOUTH_AND_EAST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BLOCK_SOUTH_AND_WEST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_JUMP_EAST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_JUMP_WEST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_JUMP_NORTH] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_JUMP_SOUTH] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNKNOWN_x3C] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNKNOWN_x3D] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNKNOWN_x3E] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNKNOWN_x3F] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_SLIDE_EASTWARD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_SLIDE_WESTWARD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_SLIDE_NORTHWARD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_SLIDE_SOUTHWARD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x44] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x45] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x46] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x47] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x48] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BLOCK_NORTH_AND_SOUTH] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BLOCK_EAST_AND_WEST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_ROCK_CLIMB_N_S] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_ROCK_CLIMB_E_W] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x4D] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x4E] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x4F] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x50] = TILE_BEHAVIOR_FLAG_SURFABLE, + [TILE_BEHAVIOR_UNUSED_x51] = TILE_BEHAVIOR_FLAG_SURFABLE, + [TILE_BEHAVIOR_UNUSED_x52] = TILE_BEHAVIOR_FLAG_SURFABLE, + [TILE_BEHAVIOR_UNUSED_x53] = TILE_BEHAVIOR_FLAG_SURFABLE, + [TILE_BEHAVIOR_UNUSED_x54] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x55] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_PASTORIA_GYM_H_GROUND] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_PASTORIA_GYM_M_GROUND] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_PASTORIA_GYM_L_GROUND] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_PASTORIA_GYM_WATER] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_JUMP_NORTH_TWICE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_JUMP_SOUTH_TWICE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_JUMP_WEST_TWICE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_JUMP_EAST_TWICE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_WARP_STAIRS_EAST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_WARP_STAIRS_WEST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNKNOWN_x60] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x61] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_WARP_ENTRANCE_EAST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_WARP_ENTRANCE_WEST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_WARP_ENTRANCE_NORTH] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_WARP_ENTRANCE_SOUTH] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x66] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_WARP_PANEL] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x68] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_DOOR] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_ESCALATOR_FLIP_FACE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_ESCALATOR] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_WARP_EAST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_WARP_WEST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_WARP_NORTH] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_WARP_SOUTH] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BRIDGE_START] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BRIDGE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BRIDGE_OVER_CAVE] = TILE_BEHAVIOR_FLAG_ENCOUNTER, + [TILE_BEHAVIOR_BRIDGE_OVER_WATER] = TILE_BEHAVIOR_FLAG_SURFABLE, + [TILE_BEHAVIOR_BRIDGE_OVER_SAND] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BRIDGE_OVER_SNOW] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BIKE_BRIDGE_N_S] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_ENCS] = TILE_BEHAVIOR_FLAG_ENCOUNTER, + [TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_WATER] = TILE_BEHAVIOR_FLAG_SURFABLE, + [TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_SAND] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BIKE_BRIDGE_E_W] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_ENCS] = TILE_BEHAVIOR_FLAG_ENCOUNTER, + [TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_WATER] = TILE_BEHAVIOR_FLAG_SURFABLE, + [TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_SAND] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x7E] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x7F] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_TABLE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x81] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x82] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_PC] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x84] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_TOWN_MAP] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_TV] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x87] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNKNOWN_x88] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x89] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x8A] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x8B] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x8C] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x8D] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNKNOWN_x8E] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNKNOWN_x8F] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x90] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x91] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x92] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x93] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x94] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x95] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x96] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x97] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x98] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x99] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x9A] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x9B] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x9C] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x9D] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x9E] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_x9F] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BERRY_PATCH] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_SNOW_DEEP] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_SNOW_DEEPER] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_SNOW_DEEPEST] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_MUD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_MUD_DEEP] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_MUD_WITH_GRASS] = TILE_BEHAVIOR_FLAG_ENCOUNTER, + [TILE_BEHAVIOR_MUD_DEEP_WITH_GRASS] = TILE_BEHAVIOR_FLAG_ENCOUNTER, + [TILE_BEHAVIOR_SNOW_SHALLOW] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_SNOW_WITH_SHADOWS] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xAA] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xAB] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xAC] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xAD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xAE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xAF] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xB0] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xB1] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xB2] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xB3] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xB4] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xB5] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xB6] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xB7] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xB8] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xB9] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xBA] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xBB] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xBC] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xBD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xBE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xBF] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xC0] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xC1] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xC2] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xC3] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xC4] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xC5] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xC6] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xC7] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xC8] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xC9] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xCA] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xCB] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xCC] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xCD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xCE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xCF] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xD0] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xD1] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xD2] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xD3] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xD4] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xD5] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xD6] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BIKE_RAMP_EASTWARD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BIKE_RAMP_WESTWARD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BIKE_SLOPE_TOP] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BIKE_SLOPE_BOTTOM] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BIKE_PARKING] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xDC] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xDD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xDE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xDF] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_SMALL_BOOKSHELF_1] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BOOKSHELF_1] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_BOOKSHELF_2] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xE3] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_TRASH_CAN] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_MART_SHELF_1] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xE6] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xE7] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xE8] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xE9] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_SMALL_BOOKSHELF_2] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_MART_SHELF_2] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_MART_SHELF_3] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xED] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xEE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xEF] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xF0] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xF1] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xF2] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xF3] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xF4] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xF5] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xF6] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xF7] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xF8] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xF9] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xFA] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xFB] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xFC] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xFD] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_UNUSED_xFE] = TILE_BEHAVIOR_FLAG_NONE, + [TILE_BEHAVIOR_MAX] = TILE_BEHAVIOR_FLAG_NONE, }; +// clang-format on BOOL TileBehavior_IsTallGrass(u8 behavior) { - return behavior == 0x02; + return behavior == TILE_BEHAVIOR_TALL_GRASS; } BOOL TileBehavior_IsVeryTallGrass(u8 behavior) { - return behavior == 0x03; + return behavior == TILE_BEHAVIOR_VERY_TALL_GRASS; } BOOL TileBehavior_IsTable(u8 behavior) { - return behavior == 0x80; + return behavior == TILE_BEHAVIOR_TABLE; } BOOL TileBehavior_IsDoor(u8 behavior) { - return behavior == 0x69; + return behavior == TILE_BEHAVIOR_DOOR; } -BOOL TileBehavior_IsEastWarpEntrance(u8 behavior) +BOOL TileBehavior_IsWarpEntranceEast(u8 behavior) { - return behavior == 0x62; + return behavior == TILE_BEHAVIOR_WARP_ENTRANCE_EAST; } -BOOL TileBehavior_IsWestWarpEntrance(u8 behavior) +BOOL TileBehavior_IsWarpEntranceWest(u8 behavior) { - return behavior == 0x63; + return behavior == TILE_BEHAVIOR_WARP_ENTRANCE_WEST; } -BOOL TileBehavior_IsNorthWarpEntrance(u8 behavior) +BOOL TileBehavior_IsWarpEntranceNorth(u8 behavior) { - return behavior == 0x64; + return behavior == TILE_BEHAVIOR_WARP_ENTRANCE_NORTH; } -BOOL TileBehavior_IsSouthWarpEntrance(u8 behavior) +BOOL TileBehavior_IsWarpEntranceSouth(u8 behavior) { - return behavior == 0x65; + return behavior == TILE_BEHAVIOR_WARP_ENTRANCE_SOUTH; } -BOOL TileBehavior_IsEastWarp(u8 behavior) +BOOL TileBehavior_IsWarpEast(u8 behavior) { - return behavior == 0x6c; + return behavior == TILE_BEHAVIOR_WARP_EAST; } -BOOL TileBehavior_IsWestWarp(u8 behavior) +BOOL TileBehavior_IsWarpWest(u8 behavior) { - return behavior == 0x6d; + return behavior == TILE_BEHAVIOR_WARP_WEST; } -BOOL TileBehavior_IsNorthWarp(u8 behavior) +BOOL TileBehavior_IsWarpNorth(u8 behavior) { - return behavior == 0x6e; + return behavior == TILE_BEHAVIOR_WARP_NORTH; } -BOOL TileBehavior_IsSouthWarp(u8 behavior) +BOOL TileBehavior_IsWarpSouth(u8 behavior) { - return behavior == 0x6f; + return behavior == TILE_BEHAVIOR_WARP_SOUTH; } BOOL TileBehavior_IsSurfable(u8 behavior) { - return (sTileBehaviorFlags[behavior] & 0x1) != 0; + return (sTileBehaviorFlags[behavior] & TILE_BEHAVIOR_FLAG_SURFABLE) != 0; } BOOL TileBehavior_IsSand(u8 behavior) { - return behavior == 0x21; + return behavior == TILE_BEHAVIOR_SAND; } BOOL TileBehavior_IsShallowWater(u8 behavior) { - return behavior == 0x17; + return behavior == TILE_BEHAVIOR_SHALLOW_WATER; } BOOL TileBehavior_IsJumpNorth(u8 behavior) { - return behavior == 0x3a; + return behavior == TILE_BEHAVIOR_JUMP_NORTH; } BOOL TileBehavior_IsJumpSouth(u8 behavior) { - return behavior == 0x3b; + return behavior == TILE_BEHAVIOR_JUMP_SOUTH; } BOOL TileBehavior_IsJumpWest(u8 behavior) { - return behavior == 0x39; + return behavior == TILE_BEHAVIOR_JUMP_WEST; } BOOL TileBehavior_IsJumpEast(u8 behavior) { - return behavior == 0x38; + return behavior == TILE_BEHAVIOR_JUMP_EAST; } BOOL TileBehavior_IsJumpNorthTwice(u8 behavior) { - return behavior == 0x5a; + return behavior == TILE_BEHAVIOR_JUMP_NORTH_TWICE; } BOOL TileBehavior_IsJumpSouthTwice(u8 behavior) { - return behavior == 0x5b; + return behavior == TILE_BEHAVIOR_JUMP_SOUTH_TWICE; } BOOL TileBehavior_IsJumpWestTwice(u8 behavior) { - return behavior == 0x5c; + return behavior == TILE_BEHAVIOR_JUMP_WEST_TWICE; } BOOL TileBehavior_IsJumpEastTwice(u8 behavior) { - return behavior == 0x5d; + return behavior == TILE_BEHAVIOR_JUMP_EAST_TWICE; } BOOL TileBehavior_IsPC(u8 behavior) { - return behavior == 0x83; + return behavior == TILE_BEHAVIOR_PC; } BOOL TileBehavior_IsTownMap(u8 behavior) { - return behavior == 0x85; + return behavior == TILE_BEHAVIOR_TOWN_MAP; } -BOOL TileBehavior_IsPastoriaGymWaterLevel1(u8 behavior) +BOOL TileBehavior_IsPastoriaGymHighGround(u8 behavior) { - return behavior == 0x56; + return behavior == TILE_BEHAVIOR_PASTORIA_GYM_H_GROUND; } -BOOL TileBehavior_IsPastoriaGymWaterLevel2(u8 behavior) +BOOL TileBehavior_IsPastoriaGymMiddleGround(u8 behavior) { - return behavior == 0x57; + return behavior == TILE_BEHAVIOR_PASTORIA_GYM_M_GROUND; } -BOOL TileBehavior_IsPastoriaGymWaterLevel3(u8 behavior) +BOOL TileBehavior_IsPastoriaGymLowGround(u8 behavior) { - return behavior == 0x58; + return behavior == TILE_BEHAVIOR_PASTORIA_GYM_L_GROUND; } -BOOL TileBehavior_IsPastoriaGymWaterEmpty(u8 behavior) +BOOL TileBehavior_IsPastoriaGymWater(u8 behavior) { - return behavior == 0x59; + return behavior == TILE_BEHAVIOR_PASTORIA_GYM_WATER; } -BOOL TileBehavior_IsEscalatorInvertPlayerFace(u8 behavior) +BOOL TileBehavior_IsEscalatorFlipFace(u8 behavior) { - return behavior == 0x6a; + return behavior == TILE_BEHAVIOR_ESCALATOR_FLIP_FACE; } BOOL TileBehavior_IsEscalator(u8 behavior) { - return behavior == 0x6b; + return behavior == TILE_BEHAVIOR_ESCALATOR; } -BOOL TileBehavior_IsEastStairsWarp(u8 behavior) +BOOL TileBehavior_IsWarpStairsEast(u8 behavior) { - return behavior == 0x5e; + return behavior == TILE_BEHAVIOR_WARP_STAIRS_EAST; } -BOOL TileBehavior_IsWestStairsWarp(u8 behavior) +BOOL TileBehavior_IsWarpStairsWest(u8 behavior) { - return behavior == 0x5f; + return behavior == TILE_BEHAVIOR_WARP_STAIRS_WEST; } BOOL TileBehavior_IsIce(u8 behavior) { - return behavior == 0x20; + return behavior == TILE_BEHAVIOR_ICE; } BOOL TileBehavior_IsRockClimbNorthSouth(u8 behavior) { - return behavior == 0x4b; + return behavior == TILE_BEHAVIOR_ROCK_CLIMB_N_S; } BOOL TileBehavior_IsRockClimbEastWest(u8 behavior) { - return behavior == 0x4c; + return behavior == TILE_BEHAVIOR_ROCK_CLIMB_E_W; } BOOL TileBehavior_IsSmallBookshelf1(u8 behavior) { - return behavior == 0xe0; + return behavior == TILE_BEHAVIOR_SMALL_BOOKSHELF_1; } BOOL TileBehavior_IsSmallBookshelf2(u8 behavior) { - return behavior == 0xea; + return behavior == TILE_BEHAVIOR_SMALL_BOOKSHELF_2; } BOOL TileBehavior_IsBookshelf1(u8 behavior) { - return behavior == 0xe1; + return behavior == TILE_BEHAVIOR_BOOKSHELF_1; } BOOL TileBehavior_IsBookshelf2(u8 behavior) { - return behavior == 0xe2; + return behavior == TILE_BEHAVIOR_BOOKSHELF_2; } BOOL TileBehavior_IsTrashCan(u8 behavior) { - return behavior == 0xe4; + return behavior == TILE_BEHAVIOR_TRASH_CAN; } -BOOL TileBehavior_IsStoreShelf1(u8 behavior) +BOOL TileBehavior_IsMartShelf1(u8 behavior) { - return behavior == 0xe5; + return behavior == TILE_BEHAVIOR_MART_SHELF_1; } -BOOL TileBehavior_IsStoreShelf2(u8 behavior) +BOOL TileBehavior_IsMartShelf2(u8 behavior) { - return behavior == 0xeb; + return behavior == TILE_BEHAVIOR_MART_SHELF_2; } -BOOL TileBehavior_IsStoreShelf3(u8 behavior) +BOOL TileBehavior_IsMartShelf3(u8 behavior) { - return behavior == 0xec; + return behavior == TILE_BEHAVIOR_MART_SHELF_3; } BOOL TileBehavior_IsMud(u8 behavior) { - return (behavior == 0xa4) || (behavior == 0xa5); + return behavior == TILE_BEHAVIOR_MUD || behavior == TILE_BEHAVIOR_MUD_DEEP; } BOOL TileBehavior_IsDeepMud(u8 behavior) { - return behavior == 0xa5; + return behavior == TILE_BEHAVIOR_MUD_DEEP; } BOOL TileBehavior_IsMudWithGrass(u8 behavior) { - return (behavior == 0xa6) || (behavior == 0xa7); + return behavior == TILE_BEHAVIOR_MUD_WITH_GRASS || behavior == TILE_BEHAVIOR_MUD_DEEP_WITH_GRASS; } BOOL TileBehavior_IsDeepMudWithGrass(u8 behavior) { - return behavior == 0xa7; + return behavior == TILE_BEHAVIOR_MUD_DEEP_WITH_GRASS; } BOOL TileBehavior_IsSnow(u8 behavior) { - return behavior == 0xa1 - || behavior == 0xa2 - || behavior == 0xa3 - || behavior == 0xa8; + return behavior == TILE_BEHAVIOR_SNOW_DEEP + || behavior == TILE_BEHAVIOR_SNOW_DEEPER + || behavior == TILE_BEHAVIOR_SNOW_DEEPEST + || behavior == TILE_BEHAVIOR_SNOW_SHALLOW; } BOOL TileBehavior_IsShallowSnow(u8 behavior) { - return behavior == 0xa8; + return behavior == TILE_BEHAVIOR_SNOW_SHALLOW; } BOOL TileBehavior_IsDeepSnow(u8 behavior) { - return behavior == 0xa1; + return behavior == TILE_BEHAVIOR_SNOW_DEEP; } BOOL TileBehavior_IsDeeperSnow(u8 behavior) { - return behavior == 0xa2; + return behavior == TILE_BEHAVIOR_SNOW_DEEPER; } BOOL TileBehavior_IsDeepestSnow(u8 behavior) { - return behavior == 0xa3; + return behavior == TILE_BEHAVIOR_SNOW_DEEPEST; } BOOL TileBehavior_IsBikeSlope(u8 behavior) { - return (behavior == 0xd9) || (behavior == 0xda); + return behavior == TILE_BEHAVIOR_BIKE_SLOPE_TOP || behavior == TILE_BEHAVIOR_BIKE_SLOPE_BOTTOM; } BOOL TileBehavior_IsBikeSlopeTop(u8 behavior) { - return behavior == 0xd9; + return behavior == TILE_BEHAVIOR_BIKE_SLOPE_TOP; } BOOL TileBehavior_IsBikeSlopeBottom(u8 behavior) { - return behavior == 0xda; + return behavior == TILE_BEHAVIOR_BIKE_SLOPE_BOTTOM; } -BOOL TileBehavior_IsBikeRampWestToEast(u8 behavior) +BOOL TileBehavior_IsBikeRampEastward(u8 behavior) { - return behavior == 0xd7; + return behavior == TILE_BEHAVIOR_BIKE_RAMP_EASTWARD; } -BOOL TileBehavior_IsBikeRampEastToWest(u8 behavior) +BOOL TileBehavior_IsBikeRampWestward(u8 behavior) { - return behavior == 0xd8; + return behavior == TILE_BEHAVIOR_BIKE_RAMP_WESTWARD; } BOOL TileBehavior_IsCaveFloor(u8 behavior) { - return behavior == 0x8; + return behavior == TILE_BEHAVIOR_CAVE_FLOOR; } BOOL TileBehavior_IsWaterfall(u8 behavior) { - return behavior == 0x13; + return behavior == TILE_BEHAVIOR_WATERFALL; } BOOL TileBehavior_IsBikeParking(u8 behavior) { - return behavior == 0xdb; + return behavior == TILE_BEHAVIOR_BIKE_PARKING; } -BOOL TileBehavior_BlocksMovementNorth(u8 behavior) +BOOL TileBehavior_BlocksMovementNorthward(u8 behavior) { - return behavior == 0x32 - || behavior == 0x34 - || behavior == 0x35 - || behavior == 0x49; + return behavior == TILE_BEHAVIOR_BLOCK_NORTHWARD + || behavior == TILE_BEHAVIOR_BLOCK_NORTH_AND_EAST + || behavior == TILE_BEHAVIOR_BLOCK_NORTH_AND_WEST + || behavior == TILE_BEHAVIOR_BLOCK_NORTH_AND_SOUTH; } -BOOL TileBehavior_BlocksMovementSouth(u8 behavior) +BOOL TileBehavior_BlocksMovementSouthward(u8 behavior) { - return behavior == 0x33 - || behavior == 0x36 - || behavior == 0x37 - || behavior == 0x49; + return behavior == TILE_BEHAVIOR_BLOCK_SOUTHWARD + || behavior == TILE_BEHAVIOR_BLOCK_SOUTH_AND_EAST + || behavior == TILE_BEHAVIOR_BLOCK_SOUTH_AND_WEST + || behavior == TILE_BEHAVIOR_BLOCK_NORTH_AND_SOUTH; } -BOOL TileBehavior_BlocksMovementWest(u8 behavior) +BOOL TileBehavior_BlocksMovementWestward(u8 behavior) { - return behavior == 0x31 - || behavior == 0x35 - || behavior == 0x37 - || behavior == 0x4a; + return behavior == TILE_BEHAVIOR_BLOCK_WESTWARD + || behavior == TILE_BEHAVIOR_BLOCK_NORTH_AND_WEST + || behavior == TILE_BEHAVIOR_BLOCK_SOUTH_AND_WEST + || behavior == TILE_BEHAVIOR_BLOCK_EAST_AND_WEST; } -BOOL TileBehavior_BlocksMovementEast(u8 behavior) +BOOL TileBehavior_BlocksMovementEastward(u8 behavior) { - return behavior == 0x30 - || behavior == 0x34 - || behavior == 0x36 - || behavior == 0x4a; + return behavior == TILE_BEHAVIOR_BLOCK_EASTWARD + || behavior == TILE_BEHAVIOR_BLOCK_NORTH_AND_EAST + || behavior == TILE_BEHAVIOR_BLOCK_SOUTH_AND_EAST + || behavior == TILE_BEHAVIOR_BLOCK_EAST_AND_WEST; } BOOL TileBehavior_IsPuddle(u8 behavior) { - return behavior == 0x16 || behavior == 0x1d; + return behavior == TILE_BEHAVIOR_PUDDLE || behavior == TILE_BEHAVIOR_PUDDLE_NO_SPLASHING; } BOOL TileBehavior_HasEncounters(u8 behavior) @@ -617,120 +615,120 @@ BOOL TileBehavior_HasEncounters(u8 behavior) BOOL TileBehavior_IsTV(u8 behavior) { - return behavior == 0x86; + return behavior == TILE_BEHAVIOR_TV; } BOOL TileBehavior_HasReflectiveSurface(u8 behavior) { - return behavior == 0x16 - || behavior == 0x10 - || behavior == 0x1d - || behavior == 0x2c; + return behavior == TILE_BEHAVIOR_PUDDLE + || behavior == TILE_BEHAVIOR_WATER_RIVER + || behavior == TILE_BEHAVIOR_PUDDLE_NO_SPLASHING + || behavior == TILE_BEHAVIOR_REFLECTIVE; } -BOOL TileBehavior_IsEastSlide(u8 behavior) +BOOL TileBehavior_IsSlideEastward(u8 behavior) { - return behavior == 0x40; + return behavior == TILE_BEHAVIOR_SLIDE_EASTWARD; } -BOOL TileBehavior_IsWestSlide(u8 behavior) +BOOL TileBehavior_IsSlideWestward(u8 behavior) { - return behavior == 0x41; + return behavior == TILE_BEHAVIOR_SLIDE_WESTWARD; } -BOOL TileBehavior_IsNorthSlide(u8 behavior) +BOOL TileBehavior_IsSlideNorthward(u8 behavior) { - return behavior == 0x42; + return behavior == TILE_BEHAVIOR_SLIDE_NORTHWARD; } -BOOL TileBehavior_IsSouthSlide(u8 behavior) +BOOL TileBehavior_IsSlideSouthward(u8 behavior) { - return behavior == 0x43; + return behavior == TILE_BEHAVIOR_SLIDE_SOUTHWARD; } BOOL TileBehavior_IsWarpPanel(u8 behavior) { - return behavior == 0x67; + return behavior == TILE_BEHAVIOR_WARP_PANEL; } BOOL TileBehavior_IsBridgeStart(u8 behavior) { - return behavior == 0x70; + return behavior == TILE_BEHAVIOR_BRIDGE_START; } BOOL TileBehavior_IsBridge(u8 behavior) { - return behavior == 0x71 - || behavior == 0x72 - || behavior == 0x73 - || behavior == 0x74 - || behavior == 0x75 - || behavior == 0x76 - || behavior == 0x77 - || behavior == 0x78 - || behavior == 0x79 - || behavior == 0x7a - || behavior == 0x7b - || behavior == 0x7c - || behavior == 0x7d; + return behavior == TILE_BEHAVIOR_BRIDGE + || behavior == TILE_BEHAVIOR_BRIDGE_OVER_CAVE + || behavior == TILE_BEHAVIOR_BRIDGE_OVER_WATER + || behavior == TILE_BEHAVIOR_BRIDGE_OVER_SAND + || behavior == TILE_BEHAVIOR_BRIDGE_OVER_SNOW + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_N_S + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_ENCS + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_WATER + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_SAND + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_E_W + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_ENCS + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_WATER + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_SAND; } BOOL TileBehavior_IsBridgeOverWater(u8 behavior) { - return behavior == 0x73 - || behavior == 0x78 - || behavior == 0x7c; + return behavior == TILE_BEHAVIOR_BRIDGE_OVER_WATER + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_WATER + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_WATER; } BOOL TileBehavior_IsBridgeOverSand(u8 behavior) { - return behavior == 0x74 - || behavior == 0x79 - || behavior == 0x7d; + return behavior == TILE_BEHAVIOR_BRIDGE_OVER_SAND + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_SAND + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_SAND; } BOOL TileBehavior_IsBridgeOverSnow(u8 behavior) { - return behavior == 0x75; + return behavior == TILE_BEHAVIOR_BRIDGE_OVER_SNOW; } BOOL TileBehavior_IsBikeBridgeNorthSouth(u8 behavior) { - return behavior == 0x76 - || behavior == 0x77 - || behavior == 0x78 - || behavior == 0x79; + return behavior == TILE_BEHAVIOR_BIKE_BRIDGE_N_S + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_ENCS + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_WATER + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_N_S_OVER_SAND; } BOOL TileBehavior_IsBikeBridgeEastWest(u8 behavior) { - return behavior == 0x7a - || behavior == 0x7b - || behavior == 0x7c - || behavior == 0x7d; + return behavior == TILE_BEHAVIOR_BIKE_BRIDGE_E_W + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_ENCS + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_WATER + || behavior == TILE_BEHAVIOR_BIKE_BRIDGE_E_W_OVER_SAND; } -BOOL TileBehavior_HasNoAttributes(u8 behavior) +BOOL TileBehavior_IsNull(u8 behavior) { - return behavior == 0xff; + return behavior == TILE_BEHAVIOR_MAX; } -u8 GetNoTileAttributesID(void) +u8 GetNullTileBehaviorID(void) { - return 0xff; + return TILE_BEHAVIOR_MAX; } BOOL TileBehavior_IsReflective(u8 behavior) { - return behavior == 0x2c || behavior == 0x1d; + return behavior == TILE_BEHAVIOR_REFLECTIVE || behavior == TILE_BEHAVIOR_PUDDLE_NO_SPLASHING; } BOOL TileBehavior_IsSnowWithShadows(u8 behavior) { - return behavior == 0xa9; + return behavior == TILE_BEHAVIOR_SNOW_WITH_SHADOWS; } BOOL TileBehavior_ForbidsExplorationKit(u8 behavior) { - return behavior == 0x2d; + return behavior == TILE_BEHAVIOR_FORBIDS_EXPLORATION_KIT; } diff --git a/src/overlay005/field_control.c b/src/overlay005/field_control.c index cd5442ca0..a184d268d 100644 --- a/src/overlay005/field_control.c +++ b/src/overlay005/field_control.c @@ -389,7 +389,7 @@ BOOL FieldInput_Process_Colosseum(FieldInput *input, FieldSystem *fieldSystem) { if (input->mapTransition && input->transitionDir == DIR_SOUTH - && TileBehavior_IsSouthWarpEntrance(Field_CurrentTileBehavior(fieldSystem))) { + && TileBehavior_IsWarpEntranceSouth(Field_CurrentTileBehavior(fieldSystem))) { ScriptManager_Set(fieldSystem, 9101, NULL); return TRUE; @@ -598,23 +598,23 @@ static BOOL Field_CheckMapTransition(FieldSystem *fieldSystem, const FieldInput tileBehavior = FieldSystem_GetTileBehavior(fieldSystem, playerX, playerZ); - if (TileBehavior_IsEastWarpEntrance(tileBehavior) || TileBehavior_IsEastWarp(tileBehavior)) { + if (TileBehavior_IsWarpEntranceEast(tileBehavior) || TileBehavior_IsWarpEast(tileBehavior)) { if (input->transitionDir != DIR_EAST) { return FALSE; } - } else if (TileBehavior_IsWestWarpEntrance(tileBehavior) || TileBehavior_IsWestWarp(tileBehavior)) { + } else if (TileBehavior_IsWarpEntranceWest(tileBehavior) || TileBehavior_IsWarpWest(tileBehavior)) { if (input->transitionDir != DIR_WEST) { return FALSE; } - } else if (TileBehavior_IsSouthWarpEntrance(tileBehavior) || TileBehavior_IsSouthWarp(tileBehavior)) { + } else if (TileBehavior_IsWarpEntranceSouth(tileBehavior) || TileBehavior_IsWarpSouth(tileBehavior)) { if (input->transitionDir != DIR_SOUTH) { return FALSE; } - } else if (TileBehavior_IsEastStairsWarp(tileBehavior)) { + } else if (TileBehavior_IsWarpStairsEast(tileBehavior)) { if (input->transitionDir != DIR_EAST) { return FALSE; } - } else if (TileBehavior_IsWestStairsWarp(tileBehavior)) { + } else if (TileBehavior_IsWarpStairsWest(tileBehavior)) { if (input->transitionDir != DIR_WEST) { return FALSE; } @@ -628,13 +628,13 @@ static BOOL Field_CheckMapTransition(FieldSystem *fieldSystem, const FieldInput if (TileBehavior_IsDoor(tileBehavior)) { transitionType = 1; - } else if (TileBehavior_IsEastStairsWarp(tileBehavior)) { + } else if (TileBehavior_IsWarpStairsEast(tileBehavior)) { transitionType = 3; - } else if (TileBehavior_IsWestStairsWarp(tileBehavior)) { + } else if (TileBehavior_IsWarpStairsWest(tileBehavior)) { transitionType = 3; - } else if (TileBehavior_IsEastWarpEntrance(tileBehavior) || TileBehavior_IsEastWarp(tileBehavior) - || TileBehavior_IsWestWarpEntrance(tileBehavior) || TileBehavior_IsWestWarp(tileBehavior) - || TileBehavior_IsSouthWarpEntrance(tileBehavior) || TileBehavior_IsSouthWarp(tileBehavior)) { + } else if (TileBehavior_IsWarpEntranceEast(tileBehavior) || TileBehavior_IsWarpEast(tileBehavior) + || TileBehavior_IsWarpEntranceWest(tileBehavior) || TileBehavior_IsWarpWest(tileBehavior) + || TileBehavior_IsWarpEntranceSouth(tileBehavior) || TileBehavior_IsWarpSouth(tileBehavior)) { sub_02056C18(fieldSystem, nextMap.mapId, nextMap.warpId, 0, 0, input->transitionDir); return TRUE; } else { @@ -663,11 +663,11 @@ u16 Field_TileBehaviorToScript(FieldSystem *fieldSystem, u8 behavior) return 2503; } else if (TileBehavior_IsTrashCan(behavior)) { return 2504; - } else if (TileBehavior_IsStoreShelf1(behavior)) { + } else if (TileBehavior_IsMartShelf1(behavior)) { return 2505; - } else if (TileBehavior_IsStoreShelf2(behavior)) { + } else if (TileBehavior_IsMartShelf2(behavior)) { return 2506; - } else if (TileBehavior_IsStoreShelf3(behavior)) { + } else if (TileBehavior_IsMartShelf3(behavior)) { return 2507; } else if (TileBehavior_IsWaterfall(behavior)) { return 10006; @@ -784,7 +784,7 @@ static BOOL Field_CheckTransition(FieldSystem *fieldSystem, const int playerX, c return FALSE; } - if (TileBehavior_IsEscalatorInvertPlayerFace(curTileBehavior) == TRUE) { + if (TileBehavior_IsEscalatorFlipFace(curTileBehavior) == TRUE) { int playerDir = PlayerAvatar_GetDir(fieldSystem->playerAvatar); if (playerDir == DIR_WEST) { @@ -810,7 +810,7 @@ static BOOL Field_CheckTransition(FieldSystem *fieldSystem, const int playerX, c return TRUE; } - if (TileBehavior_IsNorthWarpEntrance(curTileBehavior) || TileBehavior_IsNorthWarp(curTileBehavior)) { + if (TileBehavior_IsWarpEntranceNorth(curTileBehavior) || TileBehavior_IsWarpNorth(curTileBehavior)) { sub_02056C18(fieldSystem, nextMap.mapId, nextMap.warpId, 0, 0, 0); return TRUE; } diff --git a/src/overlay005/ov5_021E1154.c b/src/overlay005/ov5_021E1154.c index 8e92eb6a0..26511e994 100644 --- a/src/overlay005/ov5_021E1154.c +++ b/src/overlay005/ov5_021E1154.c @@ -37,13 +37,13 @@ int ov5_021E1154(FieldSystem *fieldSystem, PlayerAvatar *playerAvatar, int param u8 v1 = sub_02062BE8(v0); int v2; - if (TileBehavior_IsEastSlide(v1) == 1) { + if (TileBehavior_IsSlideEastward(v1) == 1) { v2 = 3; - } else if (TileBehavior_IsWestSlide(v1) == 1) { + } else if (TileBehavior_IsSlideWestward(v1) == 1) { v2 = 2; - } else if (TileBehavior_IsNorthSlide(v1) == 1) { + } else if (TileBehavior_IsSlideNorthward(v1) == 1) { v2 = 0; - } else if (TileBehavior_IsSouthSlide(v1) == 1) { + } else if (TileBehavior_IsSlideSouthward(v1) == 1) { v2 = 1; } else { return 0; @@ -118,13 +118,13 @@ static BOOL ov5_021E120C(FieldTask *param0) v0->unk_04--; if (v0->unk_04 == 0) { - if (TileBehavior_IsEastSlide(v2) == 1) { + if (TileBehavior_IsSlideEastward(v2) == 1) { v0->unk_00 = 3; - } else if (TileBehavior_IsWestSlide(v2) == 1) { + } else if (TileBehavior_IsSlideWestward(v2) == 1) { v0->unk_00 = 2; - } else if (TileBehavior_IsNorthSlide(v2) == 1) { + } else if (TileBehavior_IsSlideNorthward(v2) == 1) { v0->unk_00 = 0; - } else if (TileBehavior_IsSouthSlide(v2) == 1) { + } else if (TileBehavior_IsSlideSouthward(v2) == 1) { v0->unk_00 = 1; } else { v0->unk_00 = ov5_021E11E0(v0->unk_00); diff --git a/src/overlay005/ov5_021F61BC.c b/src/overlay005/ov5_021F61BC.c index d7af20305..92393b2ce 100644 --- a/src/overlay005/ov5_021F61BC.c +++ b/src/overlay005/ov5_021F61BC.c @@ -220,19 +220,19 @@ static void ov5_021F636C(UnkStruct_ov101_021D5D90 *param0, void *param1) static int ov5_021F6414(u8 param0) { - if (TileBehavior_IsNorthWarpEntrance(param0)) { + if (TileBehavior_IsWarpEntranceNorth(param0)) { return 0; } - if (TileBehavior_IsSouthWarpEntrance(param0)) { + if (TileBehavior_IsWarpEntranceSouth(param0)) { return 1; } - if (TileBehavior_IsWestWarpEntrance(param0)) { + if (TileBehavior_IsWarpEntranceWest(param0)) { return 2; } - if (TileBehavior_IsEastWarpEntrance(param0)) { + if (TileBehavior_IsWarpEntranceEast(param0)) { return 3; } diff --git a/src/overlay008/ov8_02249960.c b/src/overlay008/ov8_02249960.c index be100f9c4..0ae8e4b94 100644 --- a/src/overlay008/ov8_02249960.c +++ b/src/overlay008/ov8_02249960.c @@ -386,17 +386,17 @@ BOOL ov8_02249A40(FieldSystem *fieldSystem, const int param1, const int param2, v0 = FieldSystem_GetTileBehavior(fieldSystem, param1, param2); - if (TileBehavior_IsPastoriaGymWaterLevel1(v0)) { + if (TileBehavior_IsPastoriaGymHighGround(v0)) { if (param3 != 0) { (*param4) = 1; return 1; } - } else if (TileBehavior_IsPastoriaGymWaterLevel2(v0)) { + } else if (TileBehavior_IsPastoriaGymMiddleGround(v0)) { if (param3 != FX32_ONE * 16 * 2) { (*param4) = 1; return 1; } - } else if (TileBehavior_IsPastoriaGymWaterLevel3(v0)) { + } else if (TileBehavior_IsPastoriaGymLowGround(v0)) { if (param3 != FX32_ONE * 16 * 4) { (*param4) = 1; return 1; diff --git a/src/overlay009/ov9_02249960.c b/src/overlay009/ov9_02249960.c index 81f7b30f2..ec2bf209b 100644 --- a/src/overlay009/ov9_02249960.c +++ b/src/overlay009/ov9_02249960.c @@ -9567,7 +9567,7 @@ BOOL ov9_02251044(FieldSystem *fieldSystem, int param1, int param2, int param3, v1 = ov9_0224C55C(v2, param1, param2, param3); if ((v1 == 65535) || (v1 == 65534)) { - *param4 = GetNoTileAttributesID(); + *param4 = GetNullTileBehaviorID(); return 0; } diff --git a/src/unk_02054D00.c b/src/unk_02054D00.c index be4a33406..05d92f591 100644 --- a/src/unk_02054D00.c +++ b/src/unk_02054D00.c @@ -360,7 +360,7 @@ BOOL sub_02055024(const FieldSystem *fieldSystem, const VecFx32 *param1, const i if ((!v2) && (v1 == 2)) { u8 v3 = FieldSystem_GetTileBehavior(fieldSystem, param2, param3); - if (TileBehavior_IsPastoriaGymWaterEmpty(v3)) { + if (TileBehavior_IsPastoriaGymWater(v3)) { return 1; } } @@ -394,7 +394,7 @@ BOOL sub_0205507C(FieldSystem *fieldSystem, const VecFx32 *param1, const int par if ((!v2) && (v1 == 2)) { u8 v4 = FieldSystem_GetTileBehavior(fieldSystem, param2, param3); - if (TileBehavior_IsPastoriaGymWaterEmpty(v4)) { + if (TileBehavior_IsPastoriaGymWater(v4)) { return 1; } } diff --git a/src/unk_02056B30.c b/src/unk_02056B30.c index 3f4a29aab..208c46343 100644 --- a/src/unk_02056B30.c +++ b/src/unk_02056B30.c @@ -636,10 +636,10 @@ static void sub_02057368(FieldSystem *fieldSystem) v1 = Player_GetZPos(fieldSystem->playerAvatar); v4 = FieldSystem_GetTileBehavior(fieldSystem, v0, v1); - if (TileBehavior_IsEastStairsWarp(v4)) { + if (TileBehavior_IsWarpStairsEast(v4)) { v3.x += (FX32_ONE * 16); v2 = 2; - } else if (TileBehavior_IsWestStairsWarp(v4)) { + } else if (TileBehavior_IsWarpStairsWest(v4)) { v3.x -= (FX32_ONE * 16); v2 = 3; } else { diff --git a/src/unk_0205F180.c b/src/unk_0205F180.c index f635e606f..c8c55aeb4 100644 --- a/src/unk_0205F180.c +++ b/src/unk_0205F180.c @@ -473,8 +473,8 @@ static u32 sub_0205F644(PlayerAvatar *playerAvatar, int param1) static const UnkStruct_020EDB84 Unk_020EDB84[] = { { TileBehavior_IsIce, 0x1 }, { TileBehavior_IsBikeSlope, 0x2 }, - { TileBehavior_IsBikeRampWestToEast, 0x3 }, - { TileBehavior_IsBikeRampEastToWest, 0x4 }, + { TileBehavior_IsBikeRampEastward, 0x3 }, + { TileBehavior_IsBikeRampWestward, 0x4 }, { NULL, 0x6 } }; @@ -1172,7 +1172,7 @@ static void PlayerAvatar_TryCyclingGearChange(PlayerAvatar *playerAvatar, u16 pa if (pad & PAD_BUTTON_B) { u32 v0 = sub_02062BE8(Player_MapObject(playerAvatar)); - if (TileBehavior_IsBikeRampWestToEast(v0) || TileBehavior_IsBikeRampEastToWest(v0)) { + if (TileBehavior_IsBikeRampEastward(v0) || TileBehavior_IsBikeRampWestward(v0)) { return; } @@ -1855,22 +1855,22 @@ static int sub_02060E40(PlayerAvatar *playerAvatar, MapObject *mapObj, int param switch (param2) { case 0: - if (TileBehavior_IsNorthWarpEntrance(v3) == 1) { + if (TileBehavior_IsWarpEntranceNorth(v3) == 1) { return 1; } break; case 1: - if (TileBehavior_IsSouthWarpEntrance(v3) == 1) { + if (TileBehavior_IsWarpEntranceSouth(v3) == 1) { return 1; } break; case 2: - if (TileBehavior_IsWestWarpEntrance(v3) == 1) { + if (TileBehavior_IsWarpEntranceWest(v3) == 1) { return 1; } break; case 3: - if (TileBehavior_IsEastWarpEntrance(v3) == 1) { + if (TileBehavior_IsWarpEntranceEast(v3) == 1) { return 1; } break; @@ -1896,11 +1896,11 @@ static int sub_02060EE4(PlayerAvatar *playerAvatar, MapObject *mapObj, int param int v2 = MapObject_GetZPos(mapObj) + MapObject_GetDyFromDir(param2); u8 v3 = FieldSystem_GetTileBehavior(fieldSystem, v1, v2); - if ((param2 == 3) && TileBehavior_IsBikeRampWestToEast(v3)) { + if ((param2 == 3) && TileBehavior_IsBikeRampEastward(v3)) { return 1; } - if ((param2 == 2) && TileBehavior_IsBikeRampEastToWest(v3)) { + if ((param2 == 2) && TileBehavior_IsBikeRampWestward(v3)) { return 1; } }