diff options
author | Peter Kohaut | 2015-09-19 01:43:38 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-29 22:33:40 +0200 |
commit | de7f961f484bc29c33240a29376bbd24dc4d6139 (patch) | |
tree | 6632ae781aecf5553c8f0309503b42da90feb47b /engines/bladerunner/set.cpp | |
parent | 479d2f5b6293af2ae84fbdc718348a6e1126efb0 (diff) | |
download | scummvm-rg350-de7f961f484bc29c33240a29376bbd24dc4d6139.tar.gz scummvm-rg350-de7f961f484bc29c33240a29376bbd24dc4d6139.tar.bz2 scummvm-rg350-de7f961f484bc29c33240a29376bbd24dc4d6139.zip |
BLADERUNNER: added implementation of more script methods added combat structure (maybe it combat mode??)
Diffstat (limited to 'engines/bladerunner/set.cpp')
-rw-r--r-- | engines/bladerunner/set.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/engines/bladerunner/set.cpp b/engines/bladerunner/set.cpp index 7c1f25dcb0..070fd64498 100644 --- a/engines/bladerunner/set.cpp +++ b/engines/bladerunner/set.cpp @@ -130,7 +130,7 @@ int Set::findWalkbox(float x, float z) { int i; float altitude = 0.0f; int foundWalkboxId = -1; - for (i = 0; i < _walkboxCount; i++) { + for (i = 0; i < (int)_walkboxCount; i++) { if (isXzInWalkbox(x, z, &_walkboxes[i])) { if (foundWalkboxId == -1 || altitude < _walkboxes[i]._altitude) { altitude = _walkboxes[i]._altitude; @@ -147,7 +147,7 @@ bool Set::isXzInWalkbox(float x, float z, Walkbox* walkbox) { float lastX = walkbox->_vertices[walkbox->_vertexCount - 1].x; float lastZ = walkbox->_vertices[walkbox->_vertexCount - 1].z; - for (i = 0; i < walkbox->_vertexCount; i++) { + for (i = 0; i < (int)walkbox->_vertexCount; i++) { float currentX = walkbox->_vertices[i].x; float currentZ = walkbox->_vertices[i].z; @@ -165,7 +165,7 @@ bool Set::isXzInWalkbox(float x, float z, Walkbox* walkbox) { int Set::findObject(char* objectName) { int i; - for (i = 0; i < _objectCount; i++) { + for (i = 0; i < (int)_objectCount; i++) { if (scumm_stricmp(objectName, _objects[i]._name) == 0) { return i; } @@ -174,7 +174,7 @@ int Set::findObject(char* objectName) { } bool Set::objectSetHotMouse(int objectId) { - if(!_objects || objectId < 0 || objectId >= _objectCount) { + if(!_objects || objectId < 0 || objectId >= (int)_objectCount) { return false; } @@ -185,7 +185,7 @@ bool Set::objectSetHotMouse(int objectId) { bool Set::objectGetBoundingBox(int objectId, BoundingBox* boundingBox) { assert(boundingBox); - if (!_objects || objectId < 0 || objectId >= _objectCount) { + if (!_objects || objectId < 0 || objectId >= (int)_objectCount) { boundingBox->setXyz(0, 0, 0, 0, 0, 0); return false; } @@ -197,4 +197,16 @@ bool Set::objectGetBoundingBox(int objectId, BoundingBox* boundingBox) { return true; } +void Set::objectSetIsClickable(int objectId, bool isClickable) { + _objects[objectId]._isClickable = isClickable; +} + +void Set::objectSetIsObstacle(int objectId, bool isObstacle) { + _objects[objectId]._isObstacle = isObstacle; +} + +void Set::objectSetIsCombatTarget(int objectId, bool isCombatTarget) { + _objects[objectId]._isCombatTarget = isCombatTarget; +} + } // End of namespace BladeRunner |