Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef GRIM_OSTATE_H
00024 #define GRIM_OSTATE_H
00025
00026 #include "common/endian.h"
00027
00028 #include "engines/grim/pool.h"
00029 #include "engines/grim/bitmap.h"
00030
00031 namespace Grim {
00032
00033 class SaveGame;
00034
00035 class ObjectState : public PoolObject<ObjectState> {
00036 public:
00037 enum Position {
00038 OBJSTATE_BACKGROUND = 0,
00039 OBJSTATE_UNDERLAY = 1,
00040 OBJSTATE_OVERLAY = 2,
00041 OBJSTATE_STATE = 3
00042 };
00043
00044 ObjectState(int setupID, ObjectState::Position pos, const char *bitmap, const char *zbitmap, bool visible);
00045 ObjectState();
00046 ~ObjectState();
00047
00048 static int32 getStaticTag() { return MKTAG('S', 'T', 'A', 'T'); }
00049
00050 void saveState(SaveGame *savedState) const;
00051 bool restoreState(SaveGame *savedState);
00052
00053 int getSetupID() const { return _setupID; }
00054 Position getPos() const { return _pos; }
00055 void setPos(Position position) { _pos = position; }
00056
00057 const Common::String &getBitmapFilename() const;
00058
00059 void setActiveImage(int val);
00060 void draw();
00061
00062 private:
00063 bool _visibility;
00064 int _setupID;
00065 Position _pos;
00066 Bitmap::Ptr _bitmap, _zbitmap;
00067 };
00068
00069 }
00070
00071 #endif