diff options
author | Paul Gilbert | 2014-02-25 23:10:51 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-02-25 23:10:51 -0500 |
commit | c49d7196fcabf18d9e97711f67b864808ca7848a (patch) | |
tree | c9511f8c6e81428c51bfaff04c54434cad0f5501 /engines/mads/scene_data.h | |
parent | 9eaab29afedf9eceee50f882b64cb39a14e616a2 (diff) | |
download | scummvm-rg350-c49d7196fcabf18d9e97711f67b864808ca7848a.tar.gz scummvm-rg350-c49d7196fcabf18d9e97711f67b864808ca7848a.tar.bz2 scummvm-rg350-c49d7196fcabf18d9e97711f67b864808ca7848a.zip |
MADS: In progress implementation of loadScene
Diffstat (limited to 'engines/mads/scene_data.h')
-rw-r--r-- | engines/mads/scene_data.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/engines/mads/scene_data.h b/engines/mads/scene_data.h index b464cbaee3..2fcd3f9ae4 100644 --- a/engines/mads/scene_data.h +++ b/engines/mads/scene_data.h @@ -25,8 +25,11 @@ #include "common/scummsys.h" #include "common/array.h" +#include "common/str.h" +#include "common/str-array.h" #include "common/rect.h" #include "mads/assets.h" +#include "mads/game_data.h" namespace MADS { @@ -242,6 +245,70 @@ public: virtual void postActions() = 0; }; +struct RGB6 { + byte r; + byte g; + byte b; + byte unused[3]; +}; + +struct ARTHeader { + int _width; + int _height; + int _palCount; + Common::Array<RGB6> _palette; + Common::Array<RGB4> _palData; + + void load(Common::SeekableReadStream &f); +}; + +/** + * Handles general data for a given scene + */ +class SceneInfo { +private: + MADSEngine *_vm; + + SceneInfo(MADSEngine *vm, int sceneId, int v1, const Common::String &resName, + int v3, MSurface &depthSurface, MSurface &bgSurface); + + /** + * Loads the given surface with depth information of a given scene + */ + void loadCodes(MSurface &depthSurface); +public: + int _sceneId; + int _artFileNum; + int _depthStyle; + int _width; + int _height; + + int _nodeCount; + int _yBandsEnd; + int _yBandsStart; + int _maxScale; + int _minScale; + int _depthList[15]; + int _field4A; + + int _field4C; + Common::Array<InventoryObject> _objects; + Common::StringArray _setNames; + Common::Array<RGB4> _palette; +public: + /** + * Instantiates the class and loads the data + */ + static SceneInfo *load(MADSEngine *vm, int sceneId, int flags, + const Common::String &resName, int v3, MSurface &depthSurface, MSurface &bgSurface); +}; + +class ScenePalette { +public: + void clean(int *palCount); + void process(int *palCount); +}; + } // End of namespace MADS #endif /* MADS_SCENE_DATA_H */ |