// Handler.hpp : Handler class // // 17.11.1998 / DH - Genesis // // Copyright (c) 1998 Daniel Hartmeier. All rights reserved. #ifndef __Handler__ #define __Handler__ class Handler; #include "Font.hpp" #include "Sound.hpp" #include "Level.hpp" #include "Hero.hpp" #include "List.hpp" // ------------------------------------------------------------------- class Handler { public: Handler() : level(0), levelNo(1) {} virtual ~Handler(); virtual bool act(unsigned long pad) { return false; } // return true to terminate virtual void clear(GsOT *ot) { return; } virtual void draw(GsOT *ot) { return; } virtual void heroDeath() { return; } virtual void levelComplete() { return; } protected: List levels; Level *level; int levelNo; private: }; // ------------------------------------------------------------------- class RickHandler : public Handler { public: RickHandler(); virtual ~RickHandler(); virtual bool act(unsigned long pad); virtual void clear(GsOT *ot); virtual void draw(GsOT *ot); virtual void heroDeath(); virtual void levelComplete(); protected: private: virtual void actTitle(unsigned long pad); virtual void actMenu(unsigned long pad); virtual void actBeginLevel(unsigned long pad); virtual void actPlaying(unsigned long pad); virtual void actEndLevel(unsigned long pad); virtual void actGameOver(unsigned long pad); virtual void actCredits(unsigned long pad); virtual void actOptions(unsigned long pad); enum Mode { mTitle, mMenu, mBeginLevel, mPlaying, mEndLevel, mGameOver, mCredits, mOptions, mQuit } mode; int submode; Image *image, *imageRick, *imageExit, *imageMountain, *imageFont; Font *font; TextWindow *textwindow; MenuWindow *menuwindow; List credits; }; // ------------------------------------------------------------------- #endif