// Worm.h #include "libps.h" #include "pad.h" #define MAXWORMS 4 #define MAXCOLOURS 6 class CWorm : public GsSPRITE { public: CWorm(CPad* controller, int colour); //colour from 0 to MAXCOLOURS-1 static void SetUpWormSprites(); BOOL Move(GsOT* orderingTable); void Respond(); void Reset(); void ResetScore(); int GetScore(); inline void IncScore(); BOOL IsCrashed(); int GetColour(); static int mCx[MAXCOLOURS]; static int mCy[MAXCOLOURS]; static int mSpeed; protected: CPad* mController; int mActualX; //this actual x and y (internal, high res) int mActualY; int mX; //this plotted x and y screen coordinates int mY; int mHoleCount; int mSolidCount; BOOL mDoingAHole; BOOL mThroughAHole; int mHeading; //0 is up, clockwise rotation, 4096 maximum int mScore; int mColour; BOOL mCrashed; int mNextHole; int mNextSolid; static int mTexturePage; }; inline void CWorm::IncScore() { mScore++; }