22#ifndef FREESCAPE_ECLIPSE_H
23#define FREESCAPE_ECLIPSE_H
25#include "common/file.h"
27#include "freescape/music.h"
28#include "freescape/sound.h"
32class EclipseC64SFXPlayer;
34enum EclipseReleaseFlags {
35 GF_ZX_DEMO_CRASH = (1 << 0),
36 GF_ZX_DEMO_MICROHOBBY = (1 << 1),
40 kVariableEclipse2SphinxParts = 1,
41 kVariableEclipseAnkhs = 32,
49 void gotoArea(uint16 areaID,
int entranceID)
override;
51 void borderScreen()
override;
52 void titleScreen()
override;
53 void drawInfoMenu()
override;
54 void drawIndicator(
Graphics::Surface *surface,
int xPosition,
int yPosition,
int separation);
56 void drawSensorShoot(
Sensor *sensor)
override;
58 void loadAssets()
override;
59 void loadAssetsDOSFullGame()
override;
60 void pressedKey(
const int keycode)
override;
61 void releasedKey(
const int keycode)
override;
63 uint32 _initialEnergy;
64 uint32 _initialShield;
66 int _soundIndexStartFalling;
67 int _soundIndexEndFalling;
72 int _lastThirtySeconds;
74 int _lastHeartbeatSoundTick;
75 int _lastHeartIndicatorFrame;
78 void updateTimeVariables()
override;
84 void initAmigaAtari();
86 void loadAssetsZXFullGame()
override;
87 void loadAssetsCPCFullGame()
override;
88 void loadAssetsC64FullGame()
override;
89 void loadAssetsAmigaFullGame()
override;
90 void loadAssetsAtariFullGame()
override;
91 void loadAssetsCPCDemo()
override;
92 void loadAssetsZXDemo()
override;
95 void initGameState()
override;
98 void drawBackground()
override;
104 void drawAnalogClock(
Graphics::Surface *surface,
int x,
int y, uint32 colorHand1, uint32 colorHand2, uint32 colorBack);
105 void drawAnalogClockHand(
Graphics::Surface *surface,
int x,
int y,
double degrees,
double magnitude, uint32 color);
106 void drawCompass(
Graphics::Surface *surface,
int x,
int y,
double degrees,
double magnitude, uint32 color);
107 int atariCompassPhaseFromRotationY(
float rotationY)
const;
108 int atariCompassTargetPhaseFromYaw(
float yaw,
int referencePhase)
const;
109 bool isAtariDarkArea(uint16 areaID)
const;
110 void onRotate(
float xoffset,
float yoffset,
float zoffset)
override;
111 void drawEclipseIndicator(
Graphics::Surface *surface,
int x,
int y, uint32 color1, uint32 color2, uint32 color3 = 0);
113 void drawScoreString(
int score,
int x,
int y, uint32 front, uint32 back,
Graphics::Surface *surface);
122 void updateHeartFramesCPC();
123 void updateHeartFrames(
const byte *palette);
128 void loadAnkhIndicatorMask();
129 void loadAnkhCollectedMask();
130 void updateAnkhIndicator(
const byte *palette);
136 void toggleC64Sound();
139 void restartBackgroundMusic();
140 void stopBackgroundMusic();
154 byte _eclipseFadePalettes[6][16 * 3];
155 void applyEclipseFadePalette(uint16 areaID,
int brightnessLevel);
159 int8 _compassLookup[72];
160 int _atariCompassPhase;
161 int _atariCompassTargetPhase;
162 float _atariCompassTargetRemainder;
163 int _atariCompassLastUpdateTick;
164 bool _atariCompassPhaseInitialized;
165 int _atariLanternLightFrame;
166 int _atariLanternAnimationDirection;
167 int _atariLanternLastUpdateTick;
168 int _lanternBatteryLevel;
190 bool triggerWinCondition()
override;
191 bool checkIfGameEnded()
override;
192 void endGame()
override;
193 void playSoundFx(
int index,
bool sync, Sound::Type type = Sound::kTypeNormal)
override;
Definition: instruction.h:49
Definition: freescape.h:191
Definition: managed_surface.h:51
Definition: advancedDetector.h:164