ghost2_movement.zh#
Functions#
void |
Ghost_MoveXY(int xStep, int yStep, int imprecision) |
void |
Ghost_Move(int dir, int step, int imprecision) |
void |
Ghost_MoveAtAngle(int angle, int step, int imprecision) |
void |
Ghost_MoveTowardLink(int step, int imprecision) |
bool |
Ghost_CanMove(int dir, int step, int imprecision, bool inAir) |
bool |
__Ghost_CanMoveNES(int dir, int step, int imprecision) |
bool |
__Ghost_CanMoveSingle(int dir, int step, int imprecision, bool inAir) |
bool |
Ghost_CanMove(int dir, int step, int imprecision) |
bool |
Ghost_CanMovePixel(int x, int y, bool inAir) |
bool |
Ghost_CanMovePixel(int x, int y) |
int |
Ghost_ConstantWalk4(int counter, int step, int rate, int homing, int hunger) |
int |
Ghost_ConstantWalk8(int counter, int step, int rate, int homing, int hunger) |
int |
Ghost_HaltingWalk4(int counter, int step, int rate, int homing, int hunger, int haltRate, int haltTime) |
int |
Ghost_VariableWalk8(int counter, int step, int rate, int homing, int hunger, int turnCheckTime) |
int |
Ghost_FloaterWalk(int counter, int normalStep, int accelTime, int accelAmount, int accelSteps, int rate, int homing, int hunger, int turnCheckTime, int restTime) |
void |
|
int |
__Ghost_LinedUp(int range, bool eightWay) |
void |
__Ghost_NewDir4(int rate, int homing, int hunger) |
void |
__Ghost_NewDir8(int rate, int homing, int hunger) |
bool |
__FullTileWalkable(int x, int y) |
void |
Ghost_SetPosition(ffc this, npc ghost) |
Function descriptions#
void Ghost_MoveXY(int xStep, int yStep, int imprecision) 🔗 Source
void Ghost_Move(int dir, int step, int imprecision) 🔗 Source
void Ghost_MoveAtAngle(int angle, int step, int imprecision) 🔗 Source
void Ghost_MoveTowardLink(int step, int imprecision) 🔗 Source
bool Ghost_CanMove(int dir, int step, int imprecision, bool inAir) 🔗 Source
bool __Ghost_CanMoveNES(int dir, int step, int imprecision) 🔗 Source
Used by __Ghost_NewDir4() and __Ghost_NewDir8(). Uses the full step on both axes if the direction is diagonal.
bool __Ghost_CanMoveSingle(int dir, int step, int imprecision, bool inAir) 🔗 Source
Check a single line for movability; needed when checking CanMove over more than 8 pixels
bool Ghost_CanMove(int dir, int step, int imprecision) 🔗 Source
Invalid direction
bool Ghost_CanMovePixel(int x, int y, bool inAir) 🔗 Source
bool Ghost_CanMovePixel(int x, int y) 🔗 Source
int Ghost_ConstantWalk4(int counter, int step, int rate, int homing, int hunger) 🔗 Source
int Ghost_ConstantWalk8(int counter, int step, int rate, int homing, int hunger) 🔗 Source
int Ghost_HaltingWalk4(int counter, int step, int rate, int homing, int hunger, int haltRate, int haltTime) 🔗 Source
int Ghost_VariableWalk8(int counter, int step, int rate, int homing, int hunger, int turnCheckTime) 🔗 Source
int Ghost_FloaterWalk(int counter, int normalStep, int accelTime, int accelAmount, int accelSteps, int rate, int homing, int hunger, int turnCheckTime, int restTime) 🔗 Source
void __Ghost_FixCoords() 🔗 Source
Used internally by walk functions to keep the enemy lined up with the grid correctly
int __Ghost_LinedUp(int range, bool eightWay) 🔗 Source
Determines the direction to Link
void __Ghost_NewDir4(int rate, int homing, int hunger) 🔗 Source
Used by walk functions to pick a new direction
void __Ghost_NewDir8(int rate, int homing, int hunger) 🔗 Source
Used by walk functions to pick a new direction
bool __FullTileWalkable(int x, int y) 🔗 Source
Returns true if the only if the full tile at the given location is walkable