Create constants for tile behaviors and normalize names

This commit is contained in:
Rachel 2024-11-09 17:13:44 -08:00
parent 199a4003cd
commit dc4b6670ca
13 changed files with 773 additions and 505 deletions

View File

@ -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

View File

@ -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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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

View File

@ -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

View File

@ -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;
}

File diff suppressed because it is too large Load Diff

View File

@ -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;
}

View File

@ -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);

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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 {

View File

@ -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;
}
}