ScummVM API documentation
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 #ifndef DRAGONS_SCENE_H
22 #define DRAGONS_SCENE_H
23 
24 #include "common/rect.h"
25 #include "common/system.h"
26 #include "dragons/screen.h"
27 
28 namespace Dragons {
29 
30 class DragonsEngine;
31 class ActorManager;
32 class Background;
33 class DragonRMS;
34 class BackgroundResourceLoader;
35 class DragonINIResource;
36 class Screen;
37 class ScriptOpcodes;
38 class ScaleLayer;
39 struct DragonINI;
40 
41 class Scene {
42 public:
43  Common::Point _camera;
44  int16 _mapTransitionEffectSceneID;
45 
46 private:
47  DragonsEngine *_vm;
48  Screen *_screen;
49  ActorManager *_actorManager;
50  Background *_stage;
51  DragonRMS *_dragonRMS;
52  DragonINIResource *_dragonINIResource;
53  BackgroundResourceLoader *_backgroundLoader;
54  ScriptOpcodes *_scriptOpcodes;
55 
56  int16 _currentSceneId;
57  int16 _data_800633ee; //TODO this isn't referenced. Is it needed?
58 
59 public:
60  Scene(DragonsEngine *vm, Screen *screen, ScriptOpcodes *scriptOpcodes, ActorManager *actorManager, DragonRMS *_dragonRMS, DragonINIResource *_dragonINIResource, BackgroundResourceLoader *backgroundResourceLoader);
61 
62  void loadScene(uint32 sceneId, uint32 cameraPointId);
63  void loadSceneData(uint32 sceneId, uint32 cameraPointId);
64  int16 getPriorityAtPosition(Common::Point pos);
65  void draw();
66  bool contains(DragonINI *ini);
67  byte *getPalette();
68  void setStagePalette(byte *newPalette);
69  uint16 getSceneId();
70  void setSceneId(int16 newSceneId);
71  Common::Point getPoint(uint32 pointIndex);
72  uint16 getStageWidth();
73  uint16 getStageHeight();
74  void loadImageOverlay(uint16 iptId);
75  void removeImageOverlay(uint16 iptId);
76 
77  void setBgLayerPriority(uint8 newPriority);
78  void setMgLayerPriority(uint8 newPriority);
79  void setFgLayerPriority(uint8 newPriority);
80 
81  void setLayerOffset(uint8 layerNumber, Common::Point offset);
82  Common::Point getLayerOffset(uint8 layerNumber);
83  ScaleLayer *getScaleLayer();
84  void setLayerAlphaMode(uint8 layerNumber, AlphaBlendMode mode);
85 private:
86  void resetActorFrameFlags();
87  void drawActorNumber(int16 x, int16 y, uint16 actorId);
88  void drawBgLayer(uint8 layerNumber, Common::Rect rect, Graphics::Surface *surface);
89 };
90 
91 } // End of namespace Dragons
92 
93 #endif //DRAGONS_SCENE_H
Definition: background.h:36
Definition: surface.h:66
Definition: dragonini.h:64
Definition: scene.h:41
Definition: default_display_client.h:78
Definition: rect.h:144
Definition: screen.h:67
Definition: background.h:51
Definition: dragonrms.h:42
Definition: rect.h:45
Definition: actor.h:26
Definition: actor.h:59
Definition: background.h:83
Definition: scriptopcodes.h:54
Definition: dragonini.h:43
Definition: dragons.h:167