ScummVM API documentation
tattoo_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 SHERLOCK_TATTOO_SCENE_H
23 #define SHERLOCK_TATTOO_SCENE_H
24 
25 #include "common/scummsys.h"
26 #include "sherlock/scene.h"
27 #include "sherlock/tattoo/widget_lab.h"
28 
29 namespace Sherlock {
30 
31 namespace Tattoo {
32 
33 extern const int FS_TRANS[8];
34 
35 enum {
36  STARTING_GAME_SCENE = 1, WEARY_PUNT = 52, TRAIN_RIDE = 69, STARTING_INTRO_SCENE = 91, OVERHEAD_MAP2 = 90, OVERHEAD_MAP = 100
37 };
38 
40  int _flag;
41  int _sceneNumber;
42  int _numTimes;
43 
44  SceneTripEntry() : _flag(0), _sceneNumber(0), _numTimes(0) {}
45  SceneTripEntry(int flag, int sceneNumber, int numTimes) : _flag(flag),
46  _sceneNumber(sceneNumber), _numTimes(numTimes) {}
47 };
48 
49 class TattooScene : public Scene {
50 private:
51  WidgetLab _labWidget;
52 
53  void doBgAnimCheckCursor();
54 
58  void doBgAnimUpdateBgObjectsAndAnim();
59 
60  void doBgAnimDrawSprites();
61 
67  void setNPCPath(int npc);
68 protected:
78  bool loadScene(const Common::Path &filename) override;
79 
85  void checkBgShapes() override;
86 
90  void drawAllShapes() override;
91 
95  void paletteLoaded() override;
96 
100  void synchronize(Serializer &s) override;
101 
105  int closestZone(const Common::Point &pt) override;
106 public:
107  StreamingImageFile _activeCAnim;
108  Common::Array<SceneTripEntry> _sceneTripCounters;
109  bool _labTableScene;
110 public:
112 
117  int getScaleVal(const Point32 &pt);
118 
122  void freeScene() override;
123 
127  void doBgAnim() override;
128 
133  void updateBackground() override;
134 
143  int startCAnim(int cAnimNum, int playRate = 1) override;
144 
149  int findBgShape(const Common::Point &pt) override;
150 };
151 
152 } // End of namespace Tattoo
153 
154 } // End of namespace Sherlock
155 
156 #endif
Definition: array.h:52
Definition: animation.h:29
Definition: path.h:52
Definition: scene.h:145
Definition: serializer.h:79
Definition: sherlock.h:76
Definition: rect.h:45
Definition: widget_lab.h:35
Definition: objects.h:101
Definition: tattoo_scene.h:39
Definition: tattoo_scene.h:49
Definition: image_file.h:174