From 60a19d681cda14c4ebeab5d18a98e3b07a5e93a3 Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Sun, 20 Feb 2022 21:59:07 -0500 Subject: Decomped GetMapTile_2 --- src/dungeon_capabilities_1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dungeon_capabilities_1.c') diff --git a/src/dungeon_capabilities_1.c b/src/dungeon_capabilities_1.c index e6ec6fa..605f9e9 100644 --- a/src/dungeon_capabilities_1.c +++ b/src/dungeon_capabilities_1.c @@ -89,7 +89,7 @@ bool8 CannotAttack(struct DungeonEntity *pokemon, bool8 skipSleep) bool8 CanMoveInDirection(struct DungeonEntity *pokemon, u32 facingDir) { u8 crossableTerrain = GetCrossableTerrain(pokemon->entityData->entityID); - struct MapTile *currentMapTile = GetMapTileAtPosition(pokemon->posWorld.x + gAdjacentTileOffsets[facingDir].x, + struct MapTile *currentMapTile = GetMapTile_1(pokemon->posWorld.x + gAdjacentTileOffsets[facingDir].x, pokemon->posWorld.y + gAdjacentTileOffsets[facingDir].y); if (currentMapTile->tileType & TILE_TYPE_MAP_EDGE || currentMapTile->pokemon != NULL) { @@ -118,7 +118,7 @@ bool8 CanMoveInDirection(struct DungeonEntity *pokemon, u32 facingDir) } } } - currentMapTile = GetMapTileAtPosition(pokemon->posWorld.x, pokemon->posWorld.y); + currentMapTile = GetMapTile_1(pokemon->posWorld.x, pokemon->posWorld.y); if (!(currentMapTile->canMoveAdjacent[crossableTerrain] & gDirectionBitMasks[facingDir & DIRECTION_MASK])) { return FALSE; -- cgit v1.2.3 From 598a588589cb581b269f2e46373c657ec897a3a3 Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Mon, 21 Feb 2022 15:59:34 -0500 Subject: Decomped CanAttackInFront() --- src/dungeon_capabilities_1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/dungeon_capabilities_1.c') diff --git a/src/dungeon_capabilities_1.c b/src/dungeon_capabilities_1.c index 605f9e9..ef566fe 100644 --- a/src/dungeon_capabilities_1.c +++ b/src/dungeon_capabilities_1.c @@ -5,7 +5,7 @@ #include "constants/iq_skill.h" #include "constants/status.h" #include "charge_move.h" -#include "dungeon_ai.h" +#include "dungeon_ai_targeting_1.h" #include "dungeon_capabilities.h" #include "dungeon_engine.h" #include "dungeon_items.h" @@ -15,7 +15,7 @@ #include "dungeon_util.h" #include "map.h" -const u8 gDirectionBitMasks[] = {0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80}; +const u8 gDirectionBitMasks_1[] = {0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80}; static inline bool8 JoinLocationCannotUseItems(struct DungeonEntityData *pokemonData) { @@ -119,7 +119,7 @@ bool8 CanMoveInDirection(struct DungeonEntity *pokemon, u32 facingDir) } } currentMapTile = GetMapTile_1(pokemon->posWorld.x, pokemon->posWorld.y); - if (!(currentMapTile->canMoveAdjacent[crossableTerrain] & gDirectionBitMasks[facingDir & DIRECTION_MASK])) + if (!(currentMapTile->canMoveAdjacent[crossableTerrain] & gDirectionBitMasks_1[facingDir & DIRECTION_MASK])) { return FALSE; } -- cgit v1.2.3