diff options
author | Ľubomír Remák | 2018-03-20 18:58:45 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-25 23:12:01 +0200 |
commit | 1d84041508b3acaf7a47fde81e7e334c004507b8 (patch) | |
tree | 17a1e5fb8eeb5ef0a5c680d591223ba1fb6603e7 /engines/mutationofjb/game.h | |
parent | fb75e483e43a00bb20329dd0b5db92a3588a2d2e (diff) | |
download | scummvm-rg350-1d84041508b3acaf7a47fde81e7e334c004507b8.tar.gz scummvm-rg350-1d84041508b3acaf7a47fde81e7e334c004507b8.tar.bz2 scummvm-rg350-1d84041508b3acaf7a47fde81e7e334c004507b8.zip |
MUTATIONOFJB: Add Game class.
Diffstat (limited to 'engines/mutationofjb/game.h')
-rw-r--r-- | engines/mutationofjb/game.h | 142 |
1 files changed, 18 insertions, 124 deletions
diff --git a/engines/mutationofjb/game.h b/engines/mutationofjb/game.h index 6eafc79e4a..4b4ab43343 100644 --- a/engines/mutationofjb/game.h +++ b/engines/mutationofjb/game.h @@ -24,139 +24,33 @@ #define MUTATIONOFJB_GAME_H #include "common/scummsys.h" -#include "mutationofjb/inventory.h" - -namespace Common { - class ReadStream; -} namespace MutationOfJB { -static const uint8 MAX_STR_LENGTH = 0x14; - -struct Door { - /* - Door name. - Can be empty - deactivates door completely. - */ - char _name[MAX_STR_LENGTH + 1]; - /* - Scene ID where the door leads. - Can be 0 - you can hover your mouse over it, but clicking it doesn't do anything (unless scripted). - */ - uint8 _destSceneId; - /* X coordinate for player's position after going through the door. */ - uint16 _destX; - /* Y coordinate for player's position after going through the door. */ - uint16 _destY; - /* X coordinate of the door rectangle. */ - uint16 _x; - /* Y coordinate of the door rectangle. */ - uint8 _y; - /* Width of the door rectangle. */ - uint16 _width; - /* Height of the door rectangle. */ - uint8 _height; - /* X coordinate for position towards player will walk after clicking the door. */ - uint16 _walkToX; - /* Y coordinate for position towards player will walk after clicking the door. */ - uint8 _walkToY; - /* Unknown for now - likely not even used. */ - uint8 _SP; - - bool loadFromStream(Common::ReadStream &stream); -}; - -struct Object { - uint8 _AC; - uint8 _FA; - uint8 _FR; - uint8 _NA; - uint8 _FS; - uint8 _unknown; - uint8 _CA; - uint16 _x; - uint8 _y; - uint16 _XL; - uint8 _YL; - uint16 _WX; - uint8 _WY; - uint8 _SP; - - bool loadFromStream(Common::ReadStream &stream); -}; - -struct Static { - uint8 _active; - char _name[MAX_STR_LENGTH + 1]; - uint16 _x; - uint8 _y; - uint16 _width; - uint8 _height; - uint16 _walkToX; - uint8 _walkToY; - uint8 _SP; - - bool loadFromStream(Common::ReadStream &stream); -}; - -struct Bitmap { - uint8 _frame; - uint8 _isVisible; - uint16 _x1; - uint8 _y1; - uint16 _x2; - uint8 _y2; - - bool loadFromStream(Common::ReadStream &stream); -}; +class MutationOfJBEngine; +class GameData; +class Script; +class Room; - -struct Scene { - - Door *getDoor(uint8 objectId); - Object *getObject(uint8 objectId); - Static *getStatic(uint8 staticId); - - uint8 _startup; - uint8 _unknown001; - uint8 _unknown002; - uint8 _unknown003; - uint8 _DL; - - uint8 _noDoors; - Door _doors[5]; - - uint8 _noObjects; - Object _objects[9]; - - uint8 _noStatics; - Static _statics[15]; - - Bitmap _bitmaps[10]; - - uint16 _obstacleY1; - uint8 _palRotStart; - uint8 _palRotEnd; - uint8 _palRotPeriod; - uint8 _unknown38A[80]; - - bool loadFromStream(Common::ReadStream &stream); -}; - -struct GameData { +class Game { public: - GameData(); - Scene *getScene(uint8 sceneId); + Game(MutationOfJBEngine* vm); + GameData &getGameData(); + + Script *getGlobalScript() const; + Script *getLocalScript() const; - bool loadFromStream(Common::ReadStream &stream); + void changeScene(uint8 sceneId, bool partB); - uint8 _currentScene; - Inventory _inventory; - Common::String _currentAPK; private: - Scene _scenes[45]; + bool loadGameData(bool partB); + + MutationOfJBEngine *_vm; + GameData *_gameData; + Script *_globalScript; + Script *_localScript; + Room *_room; }; } |