Attack Box

Holds the attack vertices. Uses a modified vertex called AttkVtx


HRESULT c_AttkBox::LoadFromScript(LPCSTR colDetFilename, double scale,double hgt)

Taking a script located at colDetFileName, the AttkTracks are loaded with verts defined in the script.

This script is editable with the HitBox Editor


void c_AttkBox::FetchFrame(int atkNum,double frameNum, int tInd, SPoint loc, bool isRight, c_AttkTrack &aTr)

Takes the track 'tInd' of the current frame 'frameNum' of attack 'atkNum'. The current geometry of the attack is then loaded into aTr by reference.


int c_AttkBox::FetchNextBreak(int aInd, int lastB, bool isRight)

helper function for rendering; looks forward through the array finding the next 'break' vertex, denoting the end of a polygon


void c_AttkBox::TranslateAttack(SPoint t, int aInd)

Translates the entire attack by t.


c_AttkBox::ResetHits()

reset the boolean flags for this attack. This flag is used to ensure a player may not be hit by the same track of an attack more than once.