mirror of
https://github.com/pret/pmd-red.git
synced 2026-09-30 21:08:47 -05:00
Dungeon ai movement functions clean-up
This commit is contained in:
@@ -4,11 +4,6 @@
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
void AIMovement(Entity *pokemon, bool8 showRunAwayEffect);
|
||||
bool8 CanTakeItem(Entity *pokemon);
|
||||
bool8 ChooseTargetPosition(Entity *pokemon);
|
||||
void DecideMovement(Entity *pokemon, bool8 showRunAwayEffect);
|
||||
bool8 AvoidEnemies(Entity *pokemon);
|
||||
bool8 Wander(Entity *pokemon);
|
||||
void sub_807BB78(Entity *pokemon);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
|
||||
#include "structs/str_position.h"
|
||||
#include "structs/dungeon_entity.h"
|
||||
#include "structs/str_dungeon.h"
|
||||
|
||||
// Actual function in Sky. TODO: Find other uses of it and sync with Sky.
|
||||
static inline s32 GetVisibilityRange(void)
|
||||
{
|
||||
s32 visibilityRange = gDungeon->unk181e8.visibilityRange;
|
||||
if (visibilityRange == 0)
|
||||
return 2;
|
||||
|
||||
return visibilityRange;
|
||||
}
|
||||
|
||||
bool8 IsPositionActuallyInSight(DungeonPos *origin, DungeonPos *target);
|
||||
bool8 IsPositionInSight(DungeonPos *origin, DungeonPos *target);
|
||||
|
||||
@@ -125,7 +125,7 @@ static inline bool8 ItemSticky(Item *item)
|
||||
|
||||
static inline bool8 ItemExists(Item *item)
|
||||
{
|
||||
return (item->flags & ITEM_FLAG_EXISTS);
|
||||
return (item->flags & ITEM_FLAG_EXISTS) != 0; // != 0 is necessary for Blue matching
|
||||
}
|
||||
|
||||
static inline bool8 ItemSet(Item *item)
|
||||
|
||||
Reference in New Issue
Block a user