ghost2_other.zh#

Functions#

int

FindSpawnPoint(bool landOK, bool wallsOK, bool waterOK, bool pitsOK)

int

FindSpawnPoint(int type, int flag)

npc

SpawnNPC(int id)

int

FindUnusedFFC()

int

FindUnusedFFC(int startingFrom)

void

Ghost_SpawnAnimationPuff(ffc this, npc ghost)

void

Ghost_SpawnAnimationFlicker(ffc this, npc ghost)

bool

Ghost_GotHit()

bool

Ghost_WasFrozen()

void

Ghost_DeathAnimation(ffc this, npc ghost, int type)

void

Ghost_MarkAsInUse(npc ghost)

bool

Ghost_IsInUse(npc ghost)

int

Ghost_GetAttribute(npc ghost, int index, int defaultVal, int min, int max)

int

Ghost_GetAttribute(npc ghost, int index, int defaultVal)

void

Ghost_AddCombo(int combo, int x, int y, int width, int height)

void

Ghost_AddCombo(int combo, int x, int y)

void

Ghost_ClearCombos()

bool

ClockIsActive()

void

SuspendGhostZHScripts()

void

ResumeGhostZHScripts()

void

__Ghost_Explode(ffc this, npc ghost, bool flash)

void

__Ghost_ShrinkAway(ffc this, npc ghost)

void

__DeathAnimStart(ffc this, npc ghost)

void

__DeathAnimEnd(ffc this, npc ghost)

void

__DeathAnimSFX(int id, int x)

bool

__Ghost_IsFlickering(npc ghost)

void

__GhCleanUp(ffc this)

void

SetEnemyProperty(npc enemy, int property, int newValue)

int

GetEnemyProperty(npc enemy, int property)

Function descriptions#

int FindSpawnPoint(bool landOK, bool wallsOK, bool waterOK, bool pitsOK) πŸ”— Source


int FindSpawnPoint(int type, int flag) πŸ”— Source


npc SpawnNPC(int id) πŸ”— Source


int FindUnusedFFC() πŸ”— Source


int FindUnusedFFC(int startingFrom) πŸ”— Source


void Ghost_SpawnAnimationPuff(ffc this, npc ghost) πŸ”— Source


void Ghost_SpawnAnimationFlicker(ffc this, npc ghost) πŸ”— Source


bool Ghost_GotHit() πŸ”— Source


bool Ghost_WasFrozen() πŸ”— Source


void Ghost_DeathAnimation(ffc this, npc ghost, int type) πŸ”— Source


void Ghost_MarkAsInUse(npc ghost) πŸ”— Source


bool Ghost_IsInUse(npc ghost) πŸ”— Source


int Ghost_GetAttribute(npc ghost, int index, int defaultVal, int min, int max) πŸ”— Source


int Ghost_GetAttribute(npc ghost, int index, int defaultVal) πŸ”— Source


void Ghost_AddCombo(int combo, int x, int y, int width, int height) πŸ”— Source


void Ghost_AddCombo(int combo, int x, int y) πŸ”— Source


void Ghost_ClearCombos() πŸ”— Source


bool ClockIsActive() πŸ”— Source


void SuspendGhostZHScripts() πŸ”— Source


void ResumeGhostZHScripts() πŸ”— Source


void __Ghost_Explode(ffc this, npc ghost, bool flash) πŸ”— Source


void __Ghost_ShrinkAway(ffc this, npc ghost) πŸ”— Source


void __DeathAnimStart(ffc this, npc ghost) πŸ”— Source


void __DeathAnimEnd(ffc this, npc ghost) πŸ”— Source


void __DeathAnimSFX(int id, int x) πŸ”— Source

The enemy has to stay alive until the end of the animation, but the death sound generally has to play sooner. There isn’t a good way to do that, so here’s a stupid way, instead. Make another of the same enemy, hide it, and kill it. After the animation finishes, the real one will be killed silently.


bool __Ghost_IsFlickering(npc ghost) πŸ”— Source

Used in Ghost_WaitframeLight() to determine whether the enemy needs drawn


void __GhCleanUp(ffc this) πŸ”— Source

Nothing left to check, must not be flickering Reset most of the FFC’s data to default. Stuff that’s not likely to cause problems if the FFC is reused isn’t included.


void SetEnemyProperty(npc enemy, int property, int newValue) πŸ”— Source


int GetEnemyProperty(npc enemy, int property) πŸ”— Source