diff options
author | Peter Kohaut | 2018-01-14 12:12:06 +0100 |
---|---|---|
committer | Peter Kohaut | 2018-01-28 10:57:16 +0100 |
commit | 1e5f9d3078f236f306b5d868bcd52f4e47f7b512 (patch) | |
tree | 0d402af27d75064d60e4674ab3bd4c9ad08759f1 /engines/bladerunner/obstacles.h | |
parent | 3a937f19c0a5e347c801c62d345475be082f9e41 (diff) | |
download | scummvm-rg350-1e5f9d3078f236f306b5d868bcd52f4e47f7b512.tar.gz scummvm-rg350-1e5f9d3078f236f306b5d868bcd52f4e47f7b512.tar.bz2 scummvm-rg350-1e5f9d3078f236f306b5d868bcd52f4e47f7b512.zip |
BLADERUNNER: Added basic KIA interface
Settings works
Help works
Clue database works
Fixed code for inserting objects into scene
Reorganization of few files
Unification & code formatting of few older files
Diffstat (limited to 'engines/bladerunner/obstacles.h')
-rw-r--r-- | engines/bladerunner/obstacles.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/engines/bladerunner/obstacles.h b/engines/bladerunner/obstacles.h index f9641bfe6b..c2c84c3bfa 100644 --- a/engines/bladerunner/obstacles.h +++ b/engines/bladerunner/obstacles.h @@ -27,29 +27,31 @@ namespace BladeRunner { -struct ObstaclesPolygon { - bool _isPresent; - int _verticesCount; - float _left; - float _bottom; - float _right; - float _top; - Vector2 _vertices[160]; - int _vertexType[160]; -}; - class BladeRunnerEngine; class Obstacles { + static const int kPolygonCount = 50; + static const int kVertexCount = 160; + + struct Polygon { + bool isPresent; + int verticeCount; + float left; + float bottom; + float right; + float top; + Vector2 vertices[kVertexCount]; + int vertexType[kVertexCount]; + }; + BladeRunnerEngine *_vm; -private: - ObstaclesPolygon *_polygons; - ObstaclesPolygon *_polygonsBackup; - Vector2 *_vertices; - int _verticesCount; - int _count; - bool _backup; + Polygon _polygons[kPolygonCount]; + Polygon _polygonsBackup[kPolygonCount]; + Vector2 *_vertices; + int _verticeCount; + int _count; + bool _backup; public: Obstacles(BladeRunnerEngine *vm); @@ -57,7 +59,7 @@ public: void clear(); void add(float x0, float z0, float x1, float z1); - bool find(const Vector3 &from, const Vector3 &to, Vector3 *next); + bool find(const Vector3 &from, const Vector3 &to, Vector3 *next) const; void backup(); void restore(); }; |