ScummVM API documentation
debug_scene.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef TWINE_DEBUG_SCENE_H
23 #define TWINE_DEBUG_SCENE_H
24 
25 #include "common/rect.h"
26 #include "common/scummsys.h"
27 #include "twine/shared.h"
28 
29 namespace TwinE {
30 
31 class TwinEEngine;
32 
33 class DebugScene {
34 private:
35  TwinEEngine *_engine;
36 
37  void projectBoundingBoxPoints(IVec3 *point3d, IVec3 *point3dProjected);
38  bool checkZoneType(ZoneType type) const;
39  bool displayZones();
40  bool displayActors();
41  bool displayTracks();
42 
43  struct ScenePositionsProjected {
44  IVec3 frontBottomLeftPoint;
45  IVec3 frontBottomRightPoint;
46 
47  IVec3 frontTopLeftPoint;
48  IVec3 frontTopRightPoint;
49 
50  IVec3 backBottomLeftPoint;
51  IVec3 backBottomRightPoint;
52 
53  IVec3 backTopLeftPoint;
54  IVec3 backTopRightPoint;
55 
56  IVec3 frontBottomLeftPoint2D;
57  IVec3 frontBottomRightPoint2D;
58 
59  IVec3 frontTopLeftPoint2D;
60  IVec3 frontTopRightPoint2D;
61 
62  IVec3 backBottomLeftPoint2D;
63  IVec3 backBottomRightPoint2D;
64 
65  IVec3 backTopLeftPoint2D;
66  IVec3 backTopRightPoint2D;
67  };
68 
69  ScenePositionsProjected calculateBoxPositions(const IVec3 &mins, const IVec3 &maxs);
70  bool drawBox(const ScenePositionsProjected &positions, uint8 color);
71 public:
72  DebugScene(TwinEEngine *engine);
73  bool _showingZones = false;
74  bool _showingActors = false;
75  bool _showingTracks = false;
76  bool _showingClips = false;
77  bool _godMode = false;
78  int32 _typeZones = 127; // all zones on as default
79  int16 _onlyLoadActor = -1;
80 
81  void renderDebugView();
82 
83  void drawClip(const Common::Rect &rect);
84 };
85 
86 } // namespace TwinE
87 
88 #endif
Definition: shared.h:113
Definition: rect.h:144
Definition: debug_scene.h:33
Definition: twine.h:200
Definition: achievements_tables.h:27