ScummVM API documentation
eclipse.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 #include "common/file.h"
23 
24 #include "freescape/sound.h"
25 
26 namespace Freescape {
27 
28 enum EclipseReleaseFlags {
29  GF_ZX_DEMO_CRASH = (1 << 0),
30  GF_ZX_DEMO_MICROHOBBY = (1 << 1),
31 };
32 
33 enum {
34  kVariableEclipseAnkhs = 32,
35 };
36 
38 public:
39  EclipseEngine(OSystem *syst, const ADGameDescription *gd);
40 
41  void gotoArea(uint16 areaID, int entranceID) override;
42 
43  void borderScreen() override;
44  void titleScreen() override;
45  void drawInfoMenu() override;
46  void drawIndicator(Graphics::Surface *surface, int xPosition, int yPosition, int separation);
47 
48  void drawSensorShoot(Sensor *sensor) override;
49 
50  void loadAssets() override;
51  void loadAssetsDOSFullGame() override;
52  void pressedKey(const int keycode) override;
53  void releasedKey(const int keycode) override;
54 
55  uint32 _initialEnergy;
56  uint32 _initialShield;
57 
58  int _soundIndexStartFalling;
59  int _soundIndexEndFalling;
60 
61  bool _resting;
62  int _lastThirtySeconds;
63  int _lastSecond;
64  void updateTimeVariables() override;
65 
66  void initDOS();
67  void initCPC();
68  void initZX();
69  void initAmigaAtari();
70 
71  void loadAssetsZXFullGame() override;
72  void loadAssetsCPCFullGame() override;
73  void loadAssetsAtariFullGame() override;
74  void loadAssetsCPCDemo() override;
75  void loadAssetsZXDemo() override;
76 
77  void initKeymaps(Common::Keymap *engineKeyMap, Common::Keymap *infoScreenKeyMap, const char *target) override;
78  void initGameState() override;
79  void executePrint(FCLInstruction &instruction) override;
80 
81  void drawBackground() override;
82  void drawDOSUI(Graphics::Surface *surface) override;
83  void drawCPCUI(Graphics::Surface *surface) override;
84  void drawZXUI(Graphics::Surface *surface) override;
85  void drawAnalogClock(Graphics::Surface *surface, int x, int y, uint32 colorHand1, uint32 colorHand2, uint32 colorBack);
86  void drawAnalogClockHand(Graphics::Surface *surface, int x, int y, double degrees, double magnitude, uint32 color);
87  void drawCompass(Graphics::Surface *surface, int x, int y, double degrees, double magnitude, uint32 color);
88  void drawEclipseIndicator(Graphics::Surface *surface, int x, int y, uint32 color1, uint32 color2);
89 
90  soundFx *load1bPCM(Common::SeekableReadStream *file, int offset);
91 
92  bool checkIfGameEnded() override;
93  void endGame() override;
94  void loadSoundsFx(Common::SeekableReadStream *file, int offset, int number) override;
95  void playSoundFx(int index, bool sync) override;
96 
97  Common::Error saveGameStreamExtended(Common::WriteStream *stream, bool isAutosave = false) override;
98  Common::Error loadGameStreamExtended(Common::SeekableReadStream *stream) override;
99 };
100 
101 }
Definition: keymap.h:66
Definition: surface.h:67
Definition: stream.h:77
Definition: error.h:84
Definition: area.h:36
Definition: advancedDetector.h:163
Definition: sound.h:30
Definition: stream.h:745
Definition: freescape.h:152
Definition: sensor.h:34
Definition: eclipse.h:37
Definition: system.h:161
Definition: instruction.h:36