diff options
Diffstat (limited to 'engines/prince/prince.h')
-rw-r--r-- | engines/prince/prince.h | 244 |
1 files changed, 132 insertions, 112 deletions
diff --git a/engines/prince/prince.h b/engines/prince/prince.h index 6340733255..080eca5ead 100644 --- a/engines/prince/prince.h +++ b/engines/prince/prince.h @@ -1,112 +1,132 @@ -/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef PRINCE_H
-#define PRINCE_H
-
-#include "common/random.h"
-#include "common/system.h"
-#include "common/debug.h"
-#include "common/debug-channels.h"
-#include "common/textconsole.h"
-#include "common/rect.h"
-#include "common/events.h"
-
-#include "graphics/decoders/bmp.h"
-
-#include "gui/debugger.h"
-
-#include "engines/engine.h"
-#include "engines/util.h"
-
-#include "audio/mixer.h"
-
-#include "video/flic_decoder.h"
-
-#include "prince/font.h"
-#include "prince/mhwanh.h"
-
-namespace Prince {
-
-struct PrinceGameDescription;
-
-class PrinceEngine;
-class GraphicsMan;
-class Script;
-class Debugger;
-class ObjectList;
-class MobList;
-class MusicPlayer;
-
-class PrinceEngine : public Engine {
-protected:
- Common::Error run();
-
-public:
- PrinceEngine(OSystem *syst, const PrinceGameDescription *gameDesc);
- virtual ~PrinceEngine();
-
- virtual bool hasFeature(EngineFeature f) const;
-
- int getGameType() const;
- const char *getGameId() const;
- uint32 getFeatures() const;
- Common::Language getLanguage() const;
-
- const PrinceGameDescription *_gameDescription;
- Video::FlicDecoder _flicPlayer;
-
- bool loadLocation(uint16 locationNr);
- bool loadAnim(uint16 animNr);
-
- virtual GUI::Debugger *getDebugger();
-
- void changeCursor(uint16 curId);
-
-private:
- bool playNextFrame();
- void keyHandler(Common::Event event);
- void hotspot();
-
- Common::RandomSource *_rnd;
- Graphics::BitmapDecoder _roomBmp;
- uint16 _locationNr;
- MhwanhDecoder _walizkaBmp;
-
- Graphics::Surface *_cur1;
- Graphics::Surface *_cur2;
-
- Debugger *_debugger;
- GraphicsMan *_graph;
- Script *_script;
- Font _font;
- ObjectList *_objectList;
- MobList *_mobList;
- MusicPlayer *_midiPlayer;
-
- void mainLoop();
-
-};
-
-} // End of namespace Prince
-
-#endif
+/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef PRINCE_H +#define PRINCE_H + +#include "common/random.h" +#include "common/system.h" +#include "common/debug.h" +#include "common/debug-channels.h" +#include "common/textconsole.h" +#include "common/rect.h" +#include "common/events.h" + +#include "graphics/decoders/bmp.h" + +#include "gui/debugger.h" + +#include "engines/engine.h" +#include "engines/util.h" + +#include "audio/mixer.h" + +#include "video/flic_decoder.h" + +#include "prince/font.h" +#include "prince/mhwanh.h" + +namespace Prince { + +struct PrinceGameDescription; + +class PrinceEngine; +class GraphicsMan; +class Script; +class Debugger; +class ObjectList; +class MobList; +class MusicPlayer; +class VariaTxt; + +class PrinceEngine : public Engine { +protected: + Common::Error run(); + +public: + PrinceEngine(OSystem *syst, const PrinceGameDescription *gameDesc); + virtual ~PrinceEngine(); + + virtual bool hasFeature(EngineFeature f) const; + + int getGameType() const; + const char *getGameId() const; + uint32 getFeatures() const; + Common::Language getLanguage() const; + + const PrinceGameDescription *_gameDescription; + Video::FlicDecoder _flicPlayer; + VariaTxt *_variaTxt; + + uint32 _talkTxtSize; + byte *_talkTxt; + + bool loadLocation(uint16 locationNr); + bool loadAnim(uint16 animNr, bool loop); + + virtual GUI::Debugger *getDebugger(); + + void changeCursor(uint16 curId); + void printAt(const char *s, uint16 x, uint16 y); + + const char * _textSlots[1000]; + +private: + bool playNextFrame(); + void keyHandler(Common::Event event); + void hotspot(); + void scrollCameraRight(int16 delta); + void scrollCameraLeft(int16 delta); + void drawScreen(); + + uint32 getTextWidth(const char *s); + + Common::RandomSource *_rnd; + Graphics::BitmapDecoder _roomBmp; + uint16 _locationNr; + MhwanhDecoder _walizkaBmp; + + Graphics::Surface *_cur1; + Graphics::Surface *_cur2; + + Debugger *_debugger; + GraphicsMan *_graph; + Script *_script; + Font _font; + ObjectList *_objectList; + MobList *_mobList; + MusicPlayer *_midiPlayer; + uint16 _cameraX; + uint16 _newCameraX; + uint16 _sceneWidth; + + bool _flicLooped; + + void mainLoop(); + +}; + +} // End of namespace Prince + +#endif + +/* vim: set tabstop=4 noexpandtab: */ |