mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Move metatile behavior constants to include/constants and sync closer to pokeruby
This commit is contained in:
parent
ec5360364b
commit
ec0d350137
@ -51,7 +51,7 @@ FieldGetPlayerInput: @ 809BF08
|
||||
bl cur_mapdata_block_role_at_player_pos
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl MetatileBehavior_IsMoveTile
|
||||
bl MetatileBehavior_IsForcedMovementTile
|
||||
lsls r0, 24
|
||||
lsrs r7, r0, 24
|
||||
cmp r6, 0x2
|
||||
@ -1043,7 +1043,7 @@ _0809C74C:
|
||||
.pool
|
||||
_0809C764:
|
||||
adds r0, r5, 0
|
||||
bl MetatileBehavior_IsMB_BF
|
||||
bl MetatileBehavior_IsSecretBaseSandOrnament
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
@ -1072,7 +1072,7 @@ _0809C794:
|
||||
b _0809C7E2
|
||||
_0809C7A8:
|
||||
adds r0, r5, 0
|
||||
bl MetatileBehavior_IsMB_C3
|
||||
bl MetatileBehavior_IsLargeMatCenter
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
@ -1081,7 +1081,7 @@ _0809C7A8:
|
||||
b _0809C7E2
|
||||
_0809C7BC:
|
||||
adds r0, r5, 0
|
||||
bl MetatileBehavior_IsMB_B5
|
||||
bl MetatileBehavior_IsSecretBaseLargeMatEdge
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
@ -1376,7 +1376,7 @@ _0809CA04:
|
||||
bne _0809CAF8
|
||||
lsls r0, r4, 24
|
||||
lsrs r0, 24
|
||||
bl MetatileBehavior_IsMoveTile
|
||||
bl MetatileBehavior_IsForcedMovementTile
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0809CAF8
|
||||
@ -2048,7 +2048,7 @@ map_warp_consider_2_to_inside: @ 809CF78
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
adds r0, r4, 0
|
||||
bl MetatileBehavior_IsSecretBaseOpen
|
||||
bl MetatileBehavior_IsOpenSecretBaseDoor
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
|
132
include/metatile_behaviors.h → include/constants/metatile_behaviors.h
Normal file → Executable file
132
include/metatile_behaviors.h → include/constants/metatile_behaviors.h
Normal file → Executable file
@ -2,16 +2,17 @@
|
||||
#define GUARD_METATILE_BEHAVIORS
|
||||
|
||||
#define MB_NORMAL 0x00
|
||||
#define MB_SECRET_BASE_WALL 0x01
|
||||
#define MB_TALL_GRASS 0x02
|
||||
#define MB_LONG_GRASS 0x03
|
||||
#define MB_04 0x04
|
||||
#define MB_05 0x05
|
||||
#define MB_UNUSED_04 0x04
|
||||
#define MB_UNUSED_05 0x05
|
||||
#define MB_DEEP_SAND 0x06
|
||||
#define MB_SHORT_GRASS 0x07
|
||||
#define MB_CAVE 0x08
|
||||
#define MB_UNUSED_CAVE 0x08
|
||||
#define MB_LONG_GRASS_SOUTH_EDGE 0x09
|
||||
#define MB_NO_RUNNING 0x0A
|
||||
#define MB_0B 0x0B
|
||||
#define MB_INDOOR_ENCOUNTER 0x0B
|
||||
#define MB_MOUNTAIN_TOP 0x0C
|
||||
#define MB_BATTLE_PYRAMID_WARP 0x0D
|
||||
#define MB_MOSSDEEP_GYM_WARP 0x0E
|
||||
@ -24,22 +25,30 @@
|
||||
#define MB_OCEAN_WATER 0x15
|
||||
#define MB_PUDDLE 0x16
|
||||
#define MB_SHALLOW_WATER 0x17
|
||||
#define MB_18 0x18
|
||||
#define MB_UNUSED_SOOTOPOLIS_DEEP_WATER 0x18
|
||||
#define MB_NO_SURFACING 0x19
|
||||
#define MB_1A 0x1A
|
||||
#define MB_UNUSED_SOOTOPOLIS_DEEP_WATER_2 0x1A
|
||||
#define MB_STAIRS_OUTSIDE_ABANDONED_SHIP 0x1B
|
||||
#define MB_SHOAL_CAVE_ENTRANCE 0x1C
|
||||
#define MB_UNUSED_1D 0x1D
|
||||
#define MB_UNUSED_1E 0x1E
|
||||
#define MB_UNUSED_1F 0x1F
|
||||
#define MB_ICE 0x20
|
||||
#define MB_SAND 0x21
|
||||
#define MB_SEAWEED 0x22
|
||||
#define MB_UNUSED_23 0x23
|
||||
#define MB_ASHGRASS 0x24
|
||||
#define MB_25 0x25
|
||||
#define MB_FOOTPRINTS 0x25
|
||||
#define MB_THIN_ICE 0x26
|
||||
#define MB_CRACKED_ICE 0x27
|
||||
#define MB_HOT_SPRINGS 0x28
|
||||
#define MB_LAVARIDGE_GYM_B1F_WARP 0x29
|
||||
#define MB_SEAWEED_NO_SURFACING 0x2A
|
||||
#define MB_REFLECTION_UNDER_BRIDGE 0x2B
|
||||
#define MB_UNUSED_2C 0x2C
|
||||
#define MB_UNUSED_2D 0x2D
|
||||
#define MB_UNUSED_2E 0x2E
|
||||
#define MB_UNUSED_2F 0x2F
|
||||
#define MB_IMPASSABLE_EAST 0x30
|
||||
#define MB_IMPASSABLE_WEST 0x31
|
||||
#define MB_IMPASSABLE_NORTH 0x32
|
||||
@ -52,6 +61,8 @@
|
||||
#define MB_JUMP_WEST 0x39
|
||||
#define MB_JUMP_NORTH 0x3A
|
||||
#define MB_JUMP_SOUTH 0x3B
|
||||
#define MB_JUMP_NORTHEAST 0x3C
|
||||
#define MB_JUMP_NORTHWEST 0x3D
|
||||
#define MB_JUMP_SOUTHEAST 0x3E
|
||||
#define MB_JUMP_SOUTHWEST 0x3F
|
||||
#define MB_WALK_EAST 0x40
|
||||
@ -63,10 +74,29 @@
|
||||
#define MB_SLIDE_NORTH 0x46
|
||||
#define MB_SLIDE_SOUTH 0x47
|
||||
#define MB_TRICK_HOUSE_PUZZLE_8_FLOOR 0x48
|
||||
#define MB_UNUSED_49 0x49
|
||||
#define MB_UNUSED_4A 0x4A
|
||||
#define MB_UNUSED_4B 0x4B
|
||||
#define MB_UNUSED_4C 0x4C
|
||||
#define MB_UNUSED_4D 0x4D
|
||||
#define MB_UNUSED_4E 0x4E
|
||||
#define MB_UNUSED_4F 0x4F
|
||||
#define MB_EASTWARD_CURRENT 0x50
|
||||
#define MB_WESTWARD_CURRENT 0x51
|
||||
#define MB_NORTHWARD_CURRENT 0x52
|
||||
#define MB_SOUTHWARD_CURRENT 0x53
|
||||
#define MB_UNUSED_54 0x54
|
||||
#define MB_UNUSED_55 0x55
|
||||
#define MB_UNUSED_56 0x56
|
||||
#define MB_UNUSED_57 0x57
|
||||
#define MB_UNUSED_58 0x58
|
||||
#define MB_UNUSED_59 0x59
|
||||
#define MB_UNUSED_5A 0x5A
|
||||
#define MB_UNUSED_5B 0x5B
|
||||
#define MB_UNUSED_5C 0x5C
|
||||
#define MB_UNUSED_5D 0x5D
|
||||
#define MB_UNUSED_5E 0x5E
|
||||
#define MB_UNUSED_5F 0x5F
|
||||
#define MB_NON_ANIMATED_DOOR 0x60
|
||||
#define MB_LADDER 0x61
|
||||
#define MB_EAST_ARROW_WARP 0x62
|
||||
@ -82,8 +112,9 @@
|
||||
#define MB_WATER_DOOR 0x6C
|
||||
#define MB_WATER_SOUTH_ARROW_WARP 0x6D
|
||||
#define MB_DEEP_SOUTH_WARP 0x6E
|
||||
#define MB_UNUSED_6F 0x6F
|
||||
#define MB_WARP_OR_BRIDGE 0x70
|
||||
#define MB_71 0x71
|
||||
#define MB_UNUSED_71 0x71
|
||||
#define MB_ROUTE120_NORTH_BRIDGE_1 0x72
|
||||
#define MB_ROUTE120_NORTH_BRIDGE_2 0x73
|
||||
#define MB_PACIFIDLOG_VERTICAL_LOG_1 0x74
|
||||
@ -91,23 +122,27 @@
|
||||
#define MB_PACIFIDLOG_HORIZONTAL_LOG_1 0x76
|
||||
#define MB_PACIFIDLOG_HORIZONTAL_LOG_2 0x77
|
||||
#define MB_FORTREE_BRIDGE 0x78
|
||||
#define MB_UNUSED_79 0x79
|
||||
#define MB_ROUTE120_SOUTH_BRIDGE_1 0x7A
|
||||
#define MB_ROUTE120_SOUTH_BRIDGE_2 0x7B
|
||||
#define MB_ROUTE120_NORTH_BRIDGE_3 0x7C
|
||||
#define MB_ROUTE120_NORTH_BRIDGE_4 0x7D
|
||||
#define MB_7E 0x7E
|
||||
#define MB_UNUSED_7E 0x7E
|
||||
#define MB_ROUTE110_BRIDGE 0x7F
|
||||
#define MB_COUNTER 0x80
|
||||
#define MB_UNUSED_81 0x81
|
||||
#define MB_UNUSED_82 0x82
|
||||
#define MB_PC 0x83
|
||||
#define MB_CABLE_BOX_RESULTS_1 0x84
|
||||
#define MB_REGION_MAP 0x85
|
||||
#define MB_TELEVISION 0x86
|
||||
#define MB_POKEBLOCK_FEEDER 0x87
|
||||
#define MB_UNUSED_88 0x88
|
||||
#define MB_SLOT_MACHINE 0x89
|
||||
#define MB_ROULETTE 0x8A
|
||||
#define MB_CLOSED_SOOTOPOLIS_GYM_DOOR 0x8B
|
||||
#define MB_CLOSED_SOOTOPOLIS_DOOR 0x8B
|
||||
#define MB_TRICK_HOUSE_PUZZLE_DOOR 0x8C
|
||||
#define MB_8D 0x8D
|
||||
#define MB_PETALBURG_GYM_DOOR 0x8D
|
||||
#define MB_RUNNING_SHOES_INSTRUCTION 0x8E
|
||||
#define MB_QUESTIONNAIRE 0x8F
|
||||
#define MB_SECRET_BASE_SPOT_RED_CAVE 0x90
|
||||
@ -124,39 +159,56 @@
|
||||
#define MB_SECRET_BASE_SPOT_BLUE_CAVE_OPEN 0x9B
|
||||
#define MB_SECRET_BASE_SPOT_TREE_RIGHT 0x9C
|
||||
#define MB_SECRET_BASE_SPOT_TREE_RIGHT_OPEN 0x9D
|
||||
#define MB_UNUSED_9E 0x9E
|
||||
#define MB_UNUSED_9F 0x9F
|
||||
#define MB_BERRY_TREE_SOIL 0xA0
|
||||
#define MB_UNUSED_A1 0xA1
|
||||
#define MB_UNUSED_A2 0xA2
|
||||
#define MB_UNUSED_A3 0xA3
|
||||
#define MB_UNUSED_A4 0xA4
|
||||
#define MB_UNUSED_A5 0xA5
|
||||
#define MB_UNUSED_A6 0xA6
|
||||
#define MB_UNUSED_A7 0xA7
|
||||
#define MB_UNUSED_A8 0xA8
|
||||
#define MB_UNUSED_A9 0xA9
|
||||
#define MB_UNUSED_AA 0xAA
|
||||
#define MB_UNUSED_AB 0xAB
|
||||
#define MB_UNUSED_AC 0xAC
|
||||
#define MB_UNUSED_AD 0xAD
|
||||
#define MB_UNUSED_AE 0xAE
|
||||
#define MB_UNUSED_AF 0xAF
|
||||
#define MB_SECRET_BASE_PC 0xB0
|
||||
#define MB_SECRET_BASE_REGISTER_PC 0xB1
|
||||
#define MB_B2 0xB2
|
||||
#define MB_B3 0xB3
|
||||
#define MB_B4 0xB4
|
||||
#define MB_B5 0xB5
|
||||
#define MB_B6 0xB6
|
||||
#define MB_B7 0xB7
|
||||
#define MB_SECRET_BASE_UNUSED 0xB2
|
||||
#define MB_BLOCK_DECORATION 0xB3
|
||||
#define MB_SECRET_BASE_DECORATION 0xB4
|
||||
#define MB_SECRET_BASE_LARGE_MAT_EDGE 0xB5
|
||||
#define MB_UNUSED_B6 0xB6
|
||||
#define MB_SECRET_BASE_NORTH_WALL 0xB7
|
||||
#define MB_SECRET_BASE_BALLOON 0xB8
|
||||
#define MB_B9 0xB9
|
||||
#define MB_SECRET_BASE_IMPASSABLE 0xB9
|
||||
#define MB_SECRET_BASE_GLITTER_MAT 0xBA
|
||||
#define MB_SECRET_BASE_JUMP_MAT 0xBB
|
||||
#define MB_SECRET_BASE_SPIN_MAT 0xBC
|
||||
#define MB_SECRET_BASE_SOUND_MAT 0xBD
|
||||
#define MB_BE 0xBE
|
||||
#define MB_BF 0xBF
|
||||
#define MB_BED 0xC0
|
||||
#define MB_C1 0xC1
|
||||
#define MB_C2 0xC2
|
||||
#define MB_C3 0xC3
|
||||
#define MB_SECRET_BASE_BREAKABLE_DOOR 0xBE
|
||||
#define MB_SECRET_BASE_SAND_ORNAMENT 0xBF
|
||||
#define MB_IMPASSABLE_SOUTH_AND_NORTH 0xC0
|
||||
#define MB_IMPASSABLE_WEST_AND_EAST 0xC1
|
||||
#define MB_SECRET_BASE_HOLE 0xC2
|
||||
#define MB_LARGE_MAT_CENTER 0xC3
|
||||
#define MB_SECRET_BASE_TV_SHIELD 0xC4
|
||||
#define MB_C5 0xC5
|
||||
#define MB_PLAYER_ROOM_PC_ON 0xC5
|
||||
#define MB_C6 0xC6
|
||||
#define MB_SECRET_BASE_POSTER 0xC7
|
||||
#define MB_C8 0xC8
|
||||
#define MB_C9 0xC9
|
||||
#define MB_CA 0xCA
|
||||
#define MB_CB 0xCB
|
||||
#define MB_CC 0xCC
|
||||
#define MB_CD 0xCD
|
||||
#define MB_CE 0xCE
|
||||
#define MB_CF 0xCF
|
||||
#define MB_UNUSED_C8 0xC8
|
||||
#define MB_UNUSED_C9 0xC9
|
||||
#define MB_UNUSED_CA 0xCA
|
||||
#define MB_UNUSED_CB 0xCB
|
||||
#define MB_UNUSED_CC 0xCC
|
||||
#define MB_UNUSED_CD 0xCD
|
||||
#define MB_UNUSED_CE 0xCE
|
||||
#define MB_UNUSED_CF 0xCF
|
||||
#define MB_MUDDY_SLOPE 0xD0
|
||||
#define MB_BUMPY_SLOPE 0xD1
|
||||
#define MB_CRACKED_FLOOR 0xD2
|
||||
@ -164,6 +216,15 @@
|
||||
#define MB_ISOLATED_HORIZONTAL_RAIL 0xD4
|
||||
#define MB_VERTICAL_RAIL 0xD5
|
||||
#define MB_HORIZONTAL_RAIL 0xD6
|
||||
#define MB_UNUSED_D7 0xD7
|
||||
#define MB_UNUSED_D8 0xD8
|
||||
#define MB_UNUSED_D9 0xD9
|
||||
#define MB_UNUSED_DA 0xDA
|
||||
#define MB_UNUSED_DB 0xDB
|
||||
#define MB_UNUSED_DC 0xDC
|
||||
#define MB_UNUSED_DD 0xDD
|
||||
#define MB_UNUSED_DE 0xDE
|
||||
#define MB_UNUSED_DF 0xDF
|
||||
#define MB_PICTURE_BOOK_SHELF 0xE0
|
||||
#define MB_BOOKSHELF 0xE1
|
||||
#define MB_POKEMON_CENTER_BOOKSHELF 0xE2
|
||||
@ -175,5 +236,10 @@
|
||||
#define MB_WIRELESS_BOX_RESULTS 0xE8
|
||||
#define MB_TRAINER_HILL_TIMER 0xE9
|
||||
#define MB_UNKNOWN_CLOSED_DOOR 0xEA
|
||||
#define MB_UNUSED_EB 0xEB
|
||||
#define MB_UNUSED_EC 0xEC
|
||||
#define MB_UNUSED_ED 0xED
|
||||
#define MB_UNUSED_EE 0xEE
|
||||
#define MB_UNUSED_EF 0xEF
|
||||
|
||||
#endif // GUARD_METATILE_BEHAVIORS
|
@ -25,7 +25,7 @@ bool8 MetatileBehavior_IsWestArrowWarp(u8);
|
||||
bool8 MetatileBehavior_IsNorthArrowWarp(u8);
|
||||
bool8 MetatileBehavior_IsSouthArrowWarp(u8);
|
||||
bool8 MetatileBehavior_IsArrowWarp(u8);
|
||||
bool8 MetatileBehavior_IsMoveTile(u8);
|
||||
bool8 MetatileBehavior_IsForcedMovementTile(u8);
|
||||
bool8 MetatileBehavior_IsIce_2(u8);
|
||||
bool8 MetatileBehavior_IsTrickHouseSlipperyFloor(u8);
|
||||
bool8 MetatileBehavior_IsMB_05(u8);
|
||||
@ -45,43 +45,43 @@ bool8 MetatileBehavior_IsCounter(u8);
|
||||
bool8 MetatileBehavior_IsPlayerFacingTVScreen(u8 tile, u8 playerDir);
|
||||
bool8 MetatileBehavior_IsPC(u8);
|
||||
bool8 MetatileBehavior_IsCableBoxResults1(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseOpen(u8);
|
||||
bool8 MetatileBehavior_IsOpenSecretBaseDoor(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseCave(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseTree(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseShrub(u8);
|
||||
bool8 MetatileBehavior_IsSecretBasePC(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseRegisterPC(u8);
|
||||
bool8 MetatileBehavior_IsMB_B2(u8);
|
||||
bool8 MetatileBehavior_IsMB_B3(u8);
|
||||
bool8 MetatileBehavior_IsMB_B9(u8);
|
||||
bool8 MetatileBehavior_IsBlockDecoration(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseImpassable(u8);
|
||||
bool8 MetatileBehavior_IsMB_C6(u8);
|
||||
bool8 MetatileBehavior_IsSecretBasePoster(u8);
|
||||
bool8 MetatileBehavior_IsNormal(u8);
|
||||
bool8 MetatileBehavior_IsMB_B7(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseNorthWall(u8);
|
||||
bool8 MetatileBehavior_IsMB_B2_Duplicate(u8);
|
||||
bool8 MetatileBehavior_IsMB_B5(u8);
|
||||
bool8 MetatileBehavior_IsMB_C3(u8);
|
||||
bool8 MetatileBehavior_IsMB_C2(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseLargeMatEdge(u8);
|
||||
bool8 MetatileBehavior_IsLargeMatCenter(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseHole(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseBalloon(u8);
|
||||
bool8 MetatileBehavior_IsMB_BE(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseBreakableDoor(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseSoundMat(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseGlitterMat(u8);
|
||||
bool8 MetatileBehavior_IsMB_BF(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseSandOrnament(u8);
|
||||
bool8 MetatileBehavior_IsSecretBaseTvOrShield(u8);
|
||||
bool8 MetatileBehavior_IsMB_C5(u8);
|
||||
bool8 MetatileBehavior_IsPlayerRoomPCOn(u8);
|
||||
bool8 MetatileBehavior_HasRipples(u8);
|
||||
bool8 MetatileBehavior_IsPuddle(u8);
|
||||
bool8 MetatileBehavior_IsTallGrass(u8);
|
||||
bool8 MetatileBehavior_IsLongGrass(u8);
|
||||
bool8 MetatileBehavior_IsBerryTreeSoil(u8);
|
||||
bool8 MetatileBehavior_IsAshGrass(u8);
|
||||
bool8 MetatileBehavior_IsUnusedFootprintMetatile(u8);
|
||||
bool8 MetatileBehavior_IsFootprints(u8);
|
||||
bool8 MetatileBehavior_IsBridge(u8);
|
||||
u8 MetatileBehavior_GetBridgeSth(u8);
|
||||
u8 MetatileBehavior_8089510(u8);
|
||||
bool8 MetatileBehavior_IsLandWildEncounter(u8);
|
||||
bool8 MetatileBehavior_IsWaterWildEncounter(u8);
|
||||
bool8 MetatileBehavior_IsMB_0B(u8);
|
||||
bool8 MetatileBehavior_IsIndoorEncounter(u8);
|
||||
bool8 MetatileBehavior_IsMountain(u8);
|
||||
bool8 MetatileBehavior_IsDiveable(u8);
|
||||
bool8 MetatileBehavior_IsUnableToEmerge(u8);
|
||||
|
@ -642,7 +642,7 @@ u8 BattleSetup_GetTerrainId(void)
|
||||
case MAP_TYPE_ROUTE:
|
||||
break;
|
||||
case MAP_TYPE_UNDERGROUND:
|
||||
if (MetatileBehavior_IsMB_0B(tileBehavior))
|
||||
if (MetatileBehavior_IsIndoorEncounter(tileBehavior))
|
||||
return BATTLE_TERRAIN_BUILDING;
|
||||
if (MetatileBehavior_IsSurfableWaterOrUnderwater(tileBehavior))
|
||||
return BATTLE_TERRAIN_POND;
|
||||
|
@ -1171,7 +1171,7 @@ void sub_8127B90(u16 mapX, u16 mapY, u8 decWidth, u8 decHeight, u16 decor)
|
||||
{
|
||||
decLeft = mapX + j;
|
||||
behavior = GetBehaviorByMetatileId(0x200 + gDecorations[decor].tiles[i * decWidth + j]);
|
||||
if (MetatileBehavior_IsMB_B9(behavior) == TRUE || (gDecorations[decor].permission != DECORPERM_PASS_FLOOR && (behavior >> 12)))
|
||||
if (MetatileBehavior_IsSecretBaseImpassable(behavior) == TRUE || (gDecorations[decor].permission != DECORPERM_PASS_FLOOR && (behavior >> 12)))
|
||||
{
|
||||
flags = 0xc00;
|
||||
}
|
||||
@ -1179,7 +1179,7 @@ void sub_8127B90(u16 mapX, u16 mapY, u8 decWidth, u8 decHeight, u16 decor)
|
||||
{
|
||||
flags = 0x000;
|
||||
}
|
||||
if (gDecorations[decor].permission != DECORPERM_NA_WALL && MetatileBehavior_IsMB_B7(MapGridGetMetatileBehaviorAt(decLeft, decBottom)) == TRUE)
|
||||
if (gDecorations[decor].permission != DECORPERM_NA_WALL && MetatileBehavior_IsSecretBaseNorthWall(MapGridGetMetatileBehaviorAt(decLeft, decBottom)) == TRUE)
|
||||
{
|
||||
v0 = 1;
|
||||
}
|
||||
@ -1446,7 +1446,7 @@ void sub_8128414(u8 taskId)
|
||||
|
||||
bool8 sub_8128484(u8 behaviorAt, u16 behaviorBy)
|
||||
{
|
||||
if (MetatileBehavior_IsMB_B3(behaviorAt) != TRUE || behaviorBy != 0)
|
||||
if (MetatileBehavior_IsBlockDecoration(behaviorAt) != TRUE || behaviorBy != 0)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -1464,9 +1464,9 @@ bool8 sub_81284AC(u8 taskId, s16 x, s16 y, u16 decor)
|
||||
|
||||
bool8 sub_81284F4(u16 behaviorAt, const struct Decoration *decoration)
|
||||
{
|
||||
if (MetatileBehavior_IsMB_B3(behaviorAt) != TRUE)
|
||||
if (MetatileBehavior_IsBlockDecoration(behaviorAt) != TRUE)
|
||||
{
|
||||
if (decoration->id == DECOR_SOLID_BOARD && MetatileBehavior_IsMB_C2(behaviorAt) == TRUE)
|
||||
if (decoration->id == DECOR_SOLID_BOARD && MetatileBehavior_IsSecretBaseHole(behaviorAt) == TRUE)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@ -1548,7 +1548,7 @@ bool8 sub_812853C(u8 taskId, const struct Decoration *decoration)
|
||||
curX = gTasks[taskId].data[0] + j;
|
||||
behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY);
|
||||
behaviorBy = GetBehaviorByMetatileId(0x200 + decoration->tiles[j]) & 0xf000;
|
||||
if (!MetatileBehavior_IsNormal(behaviorAt) && !MetatileBehavior_IsMB_B7(behaviorAt))
|
||||
if (!MetatileBehavior_IsNormal(behaviorAt) && !MetatileBehavior_IsSecretBaseNorthWall(behaviorAt))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -1570,7 +1570,7 @@ bool8 sub_812853C(u8 taskId, const struct Decoration *decoration)
|
||||
for (j=0; j<mapX; j++)
|
||||
{
|
||||
curX = gTasks[taskId].data[0] + j;
|
||||
if (!MetatileBehavior_IsMB_B7(MapGridGetMetatileBehaviorAt(curX, curY)))
|
||||
if (!MetatileBehavior_IsSecretBaseNorthWall(MapGridGetMetatileBehaviorAt(curX, curY)))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -1589,14 +1589,14 @@ bool8 sub_812853C(u8 taskId, const struct Decoration *decoration)
|
||||
behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY);
|
||||
if (decoration->shape == DECORSHAPE_1x2)
|
||||
{
|
||||
if (!MetatileBehavior_IsMB_C3(behaviorAt))
|
||||
if (!MetatileBehavior_IsLargeMatCenter(behaviorAt))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else if (!MetatileBehavior_IsMB_B5(behaviorAt))
|
||||
else if (!MetatileBehavior_IsSecretBaseLargeMatEdge(behaviorAt))
|
||||
{
|
||||
if (!MetatileBehavior_IsMB_C3(behaviorAt))
|
||||
if (!MetatileBehavior_IsLargeMatCenter(behaviorAt))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -2385,7 +2385,7 @@ void sub_8129C74(u8 taskId)
|
||||
{
|
||||
data = gTasks[taskId].data;
|
||||
behavior = MapGridGetMetatileBehaviorAt(data[0], data[1]);
|
||||
if (MetatileBehavior_IsSecretBasePC(behavior) == TRUE || MetatileBehavior_IsMB_C5(behavior) == TRUE)
|
||||
if (MetatileBehavior_IsSecretBasePC(behavior) == TRUE || MetatileBehavior_IsPlayerRoomPCOn(behavior) == TRUE)
|
||||
{
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].invisible = FALSE;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].callback = SpriteCallbackDummy;
|
||||
|
@ -7721,7 +7721,7 @@ static void GetGroundEffectFlags_Tracks(struct EventObject *eventObj, u32 *flags
|
||||
*flags |= GROUND_EFFECT_FLAG_DEEP_SAND;
|
||||
}
|
||||
else if (MetatileBehavior_IsSandOrDeepSand(eventObj->previousMetatileBehavior)
|
||||
|| MetatileBehavior_IsUnusedFootprintMetatile(eventObj->previousMetatileBehavior))
|
||||
|| MetatileBehavior_IsFootprints(eventObj->previousMetatileBehavior))
|
||||
{
|
||||
*flags |= GROUND_EFFECT_FLAG_SAND;
|
||||
}
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include "fieldmap.h"
|
||||
#include "global.fieldmap.h"
|
||||
#include "metatile_behavior.h"
|
||||
#include "metatile_behaviors.h"
|
||||
#include "overworld.h"
|
||||
#include "rotating_gate.h"
|
||||
#include "sprite.h"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -548,7 +548,7 @@ void sub_80E933C(void)
|
||||
gSpecialVar_0x8006 = roomDecorPos[decorIdx] >> 4;
|
||||
gSpecialVar_0x8007 = roomDecorPos[decorIdx] & 0xF;
|
||||
metatile = MapGridGetMetatileBehaviorAt(gSpecialVar_0x8006 + 7, gSpecialVar_0x8007 + 7);
|
||||
if (MetatileBehavior_IsMB_B5(metatile) == TRUE || MetatileBehavior_IsMB_C3(metatile) == TRUE)
|
||||
if (MetatileBehavior_IsSecretBaseLargeMatEdge(metatile) == TRUE || MetatileBehavior_IsLargeMatCenter(metatile) == TRUE)
|
||||
{
|
||||
gSpecialVar_Result = gMapHeader.events->eventObjects[objIdx].graphicsId + VAR_0x3F20;
|
||||
VarSet(gSpecialVar_Result, gDecorations[roomDecor[decorIdx]].tiles[0]);
|
||||
@ -1271,7 +1271,7 @@ void sub_80EA3E4(u8 taskId)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (MetatileBehavior_IsMB_BE(behavior) == TRUE)
|
||||
else if (MetatileBehavior_IsSecretBaseBreakableDoor(behavior) == TRUE)
|
||||
{
|
||||
if (gUnknown_0203A01D == TRUE)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user