diff options
author | Peter Kohaut | 2018-03-24 17:20:27 +0100 |
---|---|---|
committer | Peter Kohaut | 2018-03-24 17:28:34 +0100 |
commit | 5e9985bd6e4d136ec20e5e3be7589d34051227f1 (patch) | |
tree | e8b8f70ad0f509ec7b919c68c2f09bd2bbf0e8a1 /engines/bladerunner/scene_objects.h | |
parent | 2a646f8cc287a98f90e561ce8072c2af4322fd22 (diff) | |
download | scummvm-rg350-5e9985bd6e4d136ec20e5e3be7589d34051227f1.tar.gz scummvm-rg350-5e9985bd6e4d136ec20e5e3be7589d34051227f1.tar.bz2 scummvm-rg350-5e9985bd6e4d136ec20e5e3be7589d34051227f1.zip |
BLADERUNNER: Load game methods
save methods update
replaced few char* with Common::String
changed few pointers to references
Diffstat (limited to 'engines/bladerunner/scene_objects.h')
-rw-r--r-- | engines/bladerunner/scene_objects.h | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/engines/bladerunner/scene_objects.h b/engines/bladerunner/scene_objects.h index 2f154db754..a6d552017c 100644 --- a/engines/bladerunner/scene_objects.h +++ b/engines/bladerunner/scene_objects.h @@ -30,7 +30,8 @@ namespace BladeRunner { class BladeRunnerEngine; -class SaveFile; +class SaveFileReadStream; +class SaveFileWriteStream; class View; enum SceneObjectType { @@ -46,18 +47,18 @@ class SceneObjects { static const int kSceneObjectCount = 115; struct SceneObject { - int id; - SceneObjectType type; - const BoundingBox *boundingBox; - const Common::Rect *screenRectangle; - float distanceToCamera; - bool isPresent; - bool isClickable; - bool isObstacle; - int unknown1; - bool isTarget; - bool isMoving; - bool isRetired; + int id; + SceneObjectType type; + BoundingBox boundingBox; + Common::Rect screenRectangle; + float distanceToCamera; + bool isPresent; + bool isClickable; + bool isObstacle; + int unknown1; + bool isTarget; + bool isMoving; + bool isRetired; }; BladeRunnerEngine *_vm; @@ -71,9 +72,9 @@ public: SceneObjects(BladeRunnerEngine *vm, View *view); ~SceneObjects(); - bool addActor(int sceneObjectId, BoundingBox *boundingBox, Common::Rect *screenRectangle, bool isClickable, bool isMoving, bool isTarget, bool isRetired); - bool addObject(int sceneObjectId, BoundingBox *boundingBox, bool isClickable, bool isObstacle, uint8 unknown1, bool isTarget); - bool addItem(int sceneObjectId, BoundingBox *boundingBox, Common::Rect *screenRectangle, bool isTarget, bool isObstacle); + bool addActor(int sceneObjectId, const BoundingBox &boundingBox, const Common::Rect &screenRectangle, bool isClickable, bool isMoving, bool isTarget, bool isRetired); + bool addObject(int sceneObjectId, const BoundingBox &boundingBox, bool isClickable, bool isObstacle, uint8 unknown1, bool isTarget); + bool addItem(int sceneObjectId, const BoundingBox &boundingBox, const Common::Rect &screenRectangle, bool isTarget, bool isObstacle); bool remove(int sceneObjectId); void clear(); int findByXYZ(bool *isClickable, bool *isObstacle, bool *isTarget, Vector3 &position, bool findClickables, bool findObstacles, bool findTargets) const; @@ -87,10 +88,12 @@ public: void setIsTarget(int sceneObjectId, bool isTarget); void updateObstacles(); - void save(SaveFile &f); + void save(SaveFileWriteStream &f); + void load(SaveFileReadStream &f); + private: int findById(int sceneObjectId) const; - bool addSceneObject(int sceneObjectId, SceneObjectType sceneObjectType, BoundingBox *boundingBox, Common::Rect *screenRectangle, bool isClickable, bool isObstacle, uint8 unknown1, bool isTarget, bool isMoving, bool isRetired); + bool addSceneObject(int sceneObjectId, SceneObjectType sceneObjectType, const BoundingBox &boundingBox, const Common::Rect &screenRectangle, bool isClickable, bool isObstacle, uint8 unknown1, bool isTarget, bool isMoving, bool isRetired); int findEmpty() const; }; |