22 #ifndef BLADERUNNER_SCENE_OBJECTS_H 23 #define BLADERUNNER_SCENE_OBJECTS_H 25 #include "bladerunner/boundingbox.h" 27 #include "common/rect.h" 31 class BladeRunnerEngine;
32 class SaveFileReadStream;
33 class SaveFileWriteStream;
36 enum SceneObjectType {
37 kSceneObjectTypeUnknown = -1,
38 kSceneObjectTypeActor = 0,
39 kSceneObjectTypeObject = 1,
40 kSceneObjectTypeItem = 2
46 static const int kSceneObjectCount = 115;
53 float distanceToCamera;
67 SceneObject _sceneObjects[kSceneObjectCount];
68 int _sceneObjectsSortedByDistance[kSceneObjectCount];
74 bool addActor(
int sceneObjectId,
const BoundingBox &boundingBox,
const Common::Rect &screenRectangle,
bool isClickable,
bool isMoving,
bool isTarget,
bool isRetired);
75 bool addObject(
int sceneObjectId,
const BoundingBox &boundingBox,
bool isClickable,
bool isObstacle, uint8 unknown1,
bool isTarget);
76 bool addItem(
int sceneObjectId,
const BoundingBox &boundingBox,
const Common::Rect &screenRectangle,
bool isTarget,
bool isObstacle);
77 bool remove(
int sceneObjectId);
79 int findByXYZ(
bool *isClickable,
bool *isObstacle,
bool *isTarget,
Vector3 &position,
bool findClickables,
bool findObstacles,
bool findTargets)
const;
80 bool existsOnXZ(
int exceptSceneObjectId,
float x,
float z,
bool movingActorIsObstacle,
bool standingActorIsObstacle)
const;
81 void setMoving(
int sceneObjectId,
bool isMoving);
82 void setRetired(
int sceneObjectId,
bool isRetired);
83 bool isBetween(
float sourceX,
float sourceZ,
float targetX,
float targetZ,
int sceneObjectId)
const;
84 bool isObstacleBetween(
const Vector3 &source,
const Vector3 &target,
int exceptSceneObjectId)
const;
85 void setIsClickable(
int sceneObjectId,
bool isClickable);
86 void setIsObstacle(
int sceneObjectId,
bool isObstacle);
87 void setIsTarget(
int sceneObjectId,
bool isTarget);
88 void updateObstacles();
89 int getCount() {
return _count; }
91 int findById(
int sceneObjectId)
const;
92 bool isEmptyScreenRectangle(
int sceneObjectId);
93 int compareScreenRectangle(
int sceneObjectId,
const Common::Rect &rectangle);
94 void resetScreenRectangleAndBbox(
int sceneObjectId);
95 void synchScreenRectangle(
int sceneObjectId,
const Common::Rect &targetScreenRect);
101 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);
102 int findEmpty()
const;
Definition: savefile.h:88
Definition: savefile.h:113
Definition: scene_objects.h:43
Definition: boundingbox.h:31
Definition: debugger.h:56
Definition: bladerunner.h:113