24 #ifndef SWORD2_SWORD2_H 25 #define SWORD2_SWORD2_H 27 #define FRAMES_PER_SECOND 12 34 #define RIGHT_CLICK_CLEARS_LUGGAGE 0 36 #include "engines/engine.h" 38 #include "common/events.h" 39 #include "common/util.h" 40 #include "common/random.h" 41 #include "sword2/detection.h" 43 #define MAX_starts 100 44 #define MAX_description 100 59 class ResourceManager;
69 RD_LEFTBUTTONDOWN = 0x01,
70 RD_LEFTBUTTONUP = 0x02,
71 RD_RIGHTBUTTONDOWN = 0x04,
72 RD_RIGHTBUTTONUP = 0x08,
89 char description[MAX_description];
101 uint32 _inputEventFilter;
110 void getPlayerStructures();
111 void putPlayerStructures();
113 uint32 saveData(uint16 slotNo, byte *buffer, uint32 bufferSize);
114 uint32 restoreData(uint16 slotNo, byte *buffer, uint32 bufferSize);
116 uint32 calcChecksum(byte *buffer, uint32 size);
118 uint32 _totalStartups;
119 uint32 _totalScreenManagers;
128 StartUp _startList[MAX_starts];
133 byte *fetchPsxBackground(uint32 location);
134 byte *fetchPsxParallax(uint32 location, uint8 level);
145 void syncSoundSettings()
override;
146 void pauseEngineIntern(
bool pause)
override;
152 int getFramesPerSecond();
154 void registerDefaultSettings();
156 void writeSettings();
158 void setupPersistentResources();
160 bool getSubtitles() {
return _useSubtitles; }
161 void setSubtitles(
bool b) { _useSubtitles = b; }
185 uint32 _speechFontId;
186 uint32 _controlsFontId;
189 uint32 setInputEventFilter(uint32 filter);
191 void parseInputEvents();
193 bool checkForMouseEvents();
203 #if RIGHT_CLICK_CLEARS_LUGGAGE 204 bool heldIsInInventory();
207 void fetchPalette(byte *screenFile, byte *palBuffer);
208 byte *fetchScreenHeader(byte *screenFile);
209 byte *fetchLayerHeader(byte *screenFile, uint16 layerNo);
210 byte *fetchShadingMask(byte *screenFile);
212 byte *fetchAnimHeader(byte *animFile);
213 byte *fetchCdtEntry(byte *animFile, uint16 frameNo);
214 byte *fetchFrameHeader(byte *animFile, uint16 frameNo);
215 byte *fetchBackgroundParallaxLayer(byte *screenFile,
int layer);
216 byte *fetchBackgroundLayer(byte *screenFile);
217 byte *fetchForegroundParallaxLayer(byte *screenFile,
int layer);
218 byte *fetchTextLine(byte *file, uint32 text_line);
219 bool checkTextLine(byte *file, uint32 text_line);
220 byte *fetchPaletteMatchTable(byte *screenFile);
222 uint32 saveGame(uint16 slotNo,
const byte *description);
223 uint32 restoreGame(uint16 slotNo);
224 uint32 getSaveDescription(uint16 slotNo, byte *description);
226 bool saveExists(uint16 slotNo);
227 uint32 restoreFromBuffer(byte *buffer, uint32 size);
229 uint32 findBufferSize();
235 void sleepUntil(uint32 time);
237 void initializeFontResourceFlags();
238 void initializeFontResourceFlags(uint8 language);
240 bool initStartMenu();
241 void registerStartPoint(int32 key,
char *name);
243 uint32 getNumStarts() {
return _totalStartups; }
244 uint32 getNumScreenManagers() {
return _totalScreenManagers; }
245 StartUp *getStartList() {
return _startList; }
247 void runStart(
int start);
254 static bool isPsx() {
return _platform == Common::kPlatformPSX; }
Definition: animation.h:37
EngineFeature
Definition: engine.h:253
Definition: advancedDetector.h:163
Definition: atari-screen.h:60
Definition: maketext.h:80
Definition: keyboard.h:294