diff options
author | Eugene Sandulenko | 2018-03-23 21:11:04 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-24 02:45:26 +0100 |
commit | f4a34b58f9b6eefe41f1b1896ddefd9f3bff62c9 (patch) | |
tree | a011684762e897df7e35bb8532bb18cc98672429 /engines/bladerunner | |
parent | 740ea803bbd9e7489955f1437a669274780e6857 (diff) | |
download | scummvm-rg350-f4a34b58f9b6eefe41f1b1896ddefd9f3bff62c9.tar.gz scummvm-rg350-f4a34b58f9b6eefe41f1b1896ddefd9f3bff62c9.tar.bz2 scummvm-rg350-f4a34b58f9b6eefe41f1b1896ddefd9f3bff62c9.zip |
BLADERUNNER: Added struct definitions to PoliceMaze
Diffstat (limited to 'engines/bladerunner')
-rw-r--r-- | engines/bladerunner/police_maze.cpp | 49 | ||||
-rw-r--r-- | engines/bladerunner/police_maze.h | 41 |
2 files changed, 90 insertions, 0 deletions
diff --git a/engines/bladerunner/police_maze.cpp b/engines/bladerunner/police_maze.cpp index 9a7d052e82..a4d95c7db5 100644 --- a/engines/bladerunner/police_maze.cpp +++ b/engines/bladerunner/police_maze.cpp @@ -28,13 +28,62 @@ namespace BladeRunner { PoliceMaze::PoliceMaze(BladeRunnerEngine *vm) { _vm = vm; + + reset(); + + for (int i = 0; i < kNumMazeTracks; i++) { + _tracks[i] = new PoliceMazeTargetTrack; + } } PoliceMaze::~PoliceMaze() { + for (int i = 0; i < kNumMazeTracks; i++) { + delete _tracks[i]; + } + + reset(); +} + +void PoliceMaze::reset() { + _isActive = false; + _needAnnouncement = false; + _announcementRead = false; + + for (int i = 0; i < kNumMazeTracks; i++) { + _tracks[i] = 0; + } + + _pm_var1 = 0; + _pm_var2 = 0; } void PoliceMaze::tick() { } +PoliceMazeTargetTrack::PoliceMazeTargetTrack() { + reset(); +} + +PoliceMazeTargetTrack::~PoliceMazeTargetTrack() { +} + +void PoliceMazeTargetTrack::reset() { + _isPresent = 0; + _itemId = -1; + _count = 0; + _data = 0; + _dataIndex = 0; + _pmt_var1 = 0; + _pmt_var2 = 0; + _time = 0; + _pmt_var3 = 0; + _pmt_var4 = 0; + _pointIndex = 0; + _pmt_var5 = 0; + _rotating = 0; + _maxAngle = 0; + _angleChange = 0; + _visible = true; +} } // End of namespace BladeRunner diff --git a/engines/bladerunner/police_maze.h b/engines/bladerunner/police_maze.h index 5959648d6c..20f22c3bf5 100644 --- a/engines/bladerunner/police_maze.h +++ b/engines/bladerunner/police_maze.h @@ -23,18 +23,59 @@ #ifndef BLADERUNNER_POLICE_MAZE_H #define BLADERUNNER_POLICE_MAZE_H +#include "bladerunner/vector.h" + namespace BladeRunner { +enum { + kNumMazeTracks = 64, + kNumTrackPoints = 100 +}; + class BladeRunnerEngine; +class PoliceMazeTargetTrack { + int _time; + bool _isPresent; + int _itemId; + int _count; + Vector3 _points[kNumTrackPoints]; + int *_data; + int _dataIndex; + int _pmt_var1; + int _pmt_var2; + int _pmt_var3; + int _pmt_var4; + int _pointIndex; + int _pmt_var5; + int _rotating; + int _maxAngle; + int _angleChange; + bool _visible; + +public: + PoliceMazeTargetTrack(); + ~PoliceMazeTargetTrack(); + + void reset(); +}; + class PoliceMaze { BladeRunnerEngine *_vm; + PoliceMazeTargetTrack *_tracks[kNumMazeTracks]; + bool _isActive; + bool _needAnnouncement; + bool _announcementRead; + int _pm_var1; + int _pm_var2; + public: PoliceMaze(BladeRunnerEngine *vm); ~PoliceMaze(); void tick(); + void reset(); }; } // End of namespace BladeRunner |