ScummVM API documentation
interface_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 XEEN_INTERFACE_SCENE_H
23 #define XEEN_INTERFACE_SCENE_H
24 
25 #include "common/scummsys.h"
26 #include "mm/xeen/map.h"
27 #include "mm/xeen/window.h"
28 
29 namespace MM {
30 namespace Xeen {
31 
32 class XeenEngine;
33 
35 public:
36  DrawStruct _data[132];
37  DrawStruct &_sky1, &_sky2;
38  DrawStruct &_groundSprite;
39  DrawStruct *const _groundTiles;
40  DrawStruct *const _attackImgs1;
41  DrawStruct *const _attackImgs2;
42  DrawStruct *const _attackImgs3;
43  DrawStruct *const _attackImgs4;
44 public:
49 
53  DrawStruct &operator[](int idx) {
54  assert(idx < size());
55  return _data[idx];
56  }
57 
61  int size() const {
62  return 132;
63  }
64 
68  void draw();
69 };
70 
72 public:
73  DrawStruct _data[170];
74  DrawStruct &_sky1, &_sky2;
75  DrawStruct &_ground;
76  DrawStruct &_horizon;
77  DrawStruct *const _groundTiles;
78  DrawStruct &_swl_0F1R, &_swl_0F1L, &_swl_1F1R, &_swl_1F1L,
79  &_swl_2F2R, &_swl_2F1R, &_swl_2F1L, &_swl_2F2L,
80  &_swl_3F1R, &_swl_3F2R, &_swl_3F3R, &_swl_3F4R,
81  &_swl_3F1L, &_swl_3F2L, &_swl_3F3L, &_swl_3F4L,
82  &_swl_4F4R, &_swl_4F3R, &_swl_4F2R, &_swl_4F1R,
83  &_swl_4F1L, &_swl_4F2L, &_swl_4F3L, &_swl_4F4L;
84  DrawStruct &_fwl_4F4R, &_fwl_4F3R, &_fwl_4F2R, &_fwl_4F1R,
85  &_fwl_4F, &_fwl_4F1L, &_fwl_4F2L, &_fwl_4F3L, &_fwl_4F4L;
86  DrawStruct &_fwl_2F1R, &_fwl_2F, &_fwl_2F1L, &_fwl_3F2R,
87  &_fwl_3F1R, &_fwl_3F, &_fwl_3F1L, &_fwl_3F2L;
88  DrawStruct &_fwl_1F, &_fwl_1F1R, &_fwl_1F1L;
89  DrawStruct &_objects0, &_objects1, &_objects2, &_objects3;
90  DrawStruct &_objects4, &_objects5, &_objects6, &_objects7;
91  DrawStruct &_objects8, &_objects9, &_objects10, &_objects11;
92  DrawStruct *const _attackImgs1;
93  DrawStruct *const _attackImgs2;
94  DrawStruct *const _attackImgs3;
95  DrawStruct *const _attackImgs4;
96 public:
98 
102  DrawStruct &operator[](int idx) {
103  assert(idx < size());
104  return _data[idx];
105  }
106 
110  int size() const {
111  return 170;
112  }
113 
117  void draw();
118 };
119 
121 private:
122  XeenEngine *_vm;
123  int _combatFloatCounter;
124 
125  void initDrawStructs();
126 
131  void setMonsterSprite(DrawStruct &drawStruct, MazeMonster &monster,
132  SpriteResource *sprites, int frame, int defaultY);
133 
137  void drawOutdoorsScene();
138 
142  void drawIndoorsScene();
143 protected:
144  int8 _wp[20];
145  byte _wo[308];
146  bool _flipWater;
147  bool _flipGround;
148  bool _flipSky;
149  bool _flipDefaultGround;
150  bool _thinWall;
151  bool _isAnimReset;
152 
153  void setMazeBits();
154 
159  void animate3d();
160 
164  void drawScene();
165 public:
166  OutdoorDrawList _outdoorList;
167  IndoorDrawList _indoorList;
168  SpriteResource _charPowSprites;
169  int _objNumber;
170  int _overallFrame;
171  bool _charsShooting;
172  bool _openDoor;
173  bool _isAttacking;
174 public:
176 
177  virtual ~InterfaceScene() {
178  }
179 
183  void setIndoorsMonsters();
184 
188  void setIndoorsObjects();
189 
193  void setIndoorsWallPics();
194 
198  void drawIndoors();
199 
203  void setOutdoorsMonsters();
204 
208  void setOutdoorsObjects();
209 
213  void drawOutdoors();
214 };
215 
216 } // End of namespace Xeen
217 } // End of namespace MM
218 
219 #endif
Definition: sprites.h:52
Definition: interface_scene.h:34
Definition: interface_scene.h:120
int size() const
Definition: interface_scene.h:61
Definition: xeen.h:93
Definition: window.h:38
DrawStruct & operator[](int idx)
Definition: interface_scene.h:53
Definition: map.h:268
Definition: detection.h:27
Definition: interface_scene.h:71
DrawStruct & operator[](int idx)
Definition: interface_scene.h:102
int size() const
Definition: interface_scene.h:110