30 #include "common/random.h" 31 #include "common/savefile.h" 32 #include "common/serializer.h" 33 #include "engines/engine.h" 34 #include "common/system.h" 35 #include "cge2/fileio.h" 36 #include "cge2/console.h" 37 #include "audio/mixer.h" 66 struct SavegameHeader;
69 #define kScrHeight 240 72 #define kWorldHeight (kScrHeight - kPanHeight) 83 #define kPocketsWidth 59 86 #define kIntroExt ".I80" 87 #define kTabName "CGE.TAB" 88 #define kPocketFull 170 89 #define kGameFrameDelay (750 / 50) 90 #define kGameTickDelay (750 / 62) 98 #define kOffUseCount 130 99 #define kOffUseText 131 101 #define kSysTimeRate 6 // 12 Hz 102 #define kBlinkRate 4 // 3 Hz 104 #define kQuitTitle 200 105 #define kQuitText 201 106 #define kNoQuitText 202 108 #define kSavegameVersion 2 109 #define kSavegameStrSize 12 110 #define kSavegameStr "SCUMMVM_CGE2" 127 int16 saveYear, saveMonth, saveDay;
128 int16 saveHour, saveMinutes;
132 enum ColorBank { kCBRel, kCBStd, kCBSay, kCBInf, kCBMnu, kCBWar };
134 enum GamePhase { kPhaseInGame, kPhaseIntro, kPhaseOver };
138 kCGE2DebugOpcode = 1 << 0
142 kNullCB = 0, kQGame, kXScene
145 enum Action { kNear, kMTake, kFTake, kActions };
147 typedef void (
CGE2Engine::*NotifyFunctionType)();
151 uint32 _lastFrame, _lastTick;
159 bool loadGame(
int slotNumber);
175 bool showTitle(
const char *name);
177 char *mergeExt(
char *buf,
const char *name,
const char *ext);
178 void inf(
const char *text, ColorBank col = kCBInf);
179 void movie(
const char *ext);
182 void loadScript(
const char *fname,
bool onlyToolbar =
false);
183 Sprite *loadSprite(
const char *fname,
int ref,
int scene,
V3D &pos);
184 void badLab(
const char *fn);
185 void sceneUp(
int cav);
188 void switchScene(
int scene);
190 void showBak(
int ref);
192 int newRandom(
int range);
194 void selectPocket(
int n);
196 void feedSnail(
Sprite *spr, Action snq,
Hero *hero);
197 int freePockets(
int sx);
198 int findActivePocket(
int ref);
207 void releasePocket(
Sprite *spr);
208 void switchHero(
int sex);
210 void setAutoColors();
211 bool cross(
const V2D &a,
const V2D &b,
const V2D &c,
const V2D &d);
212 bool contain(
const V2D &a,
const V2D &b,
const V2D &p);
213 long det(
const V2D &a,
const V2D &b,
const V2D &c);
215 int mapCross(
const V2D &a,
const V2D &b);
221 void optionTouch(
int opt, uint16 mask);
222 void switchColorMode();
225 void setVolume(
int idx,
int cnt);
226 void checkVolumeSwitches();
231 void initVolumeSwitch(
Sprite *volSwitch,
int val);
236 void setEye(
const V3D &e);
237 void setEye(
const V2D& e2,
int z = -kScrWidth);
238 void setEye(
const char *s);
241 char *token(
char *s);
243 int takeEnum(
const char *
const *tab,
const char *text);
244 ID ident(
const char *s);
245 bool testBool(
char *s);
248 void snHide(
Sprite *spr,
int val);
249 void snMidi(
int val);
250 void snSeq(
Sprite *spr,
int val);
251 void snRSeq(
Sprite *spr,
int val);
252 void snSend(
Sprite *spr,
int val);
253 void snSwap(
Sprite *spr,
int val);
254 void snCover(
Sprite *spr,
int val);
256 void snKeep(
Sprite *spr,
int val);
257 void snGive(
Sprite *spr,
int val);
258 void snGoto(
Sprite *spr,
int val);
259 void snPort(
Sprite *spr,
int port);
260 void snMouse(
bool on);
261 void snNNext(
Sprite *spr, Action act,
int val);
262 void snRNNext(
Sprite *spr,
int val);
263 void snRMTNext(
Sprite *spr,
int val);
264 void snRFTNext(
Sprite *spr,
int val);
265 void snRmNear(
Sprite *spr);
266 void snRmMTake(
Sprite *spr);
267 void snRmFTake(
Sprite *spr);
268 void snSetRef(
Sprite *spr,
int val);
269 void snFlash(
bool on);
270 void snCycle(
int cnt);
271 void snWalk(
Sprite *spr,
int val);
272 void snReach(
Sprite *spr,
int val);
274 void snRoom(
Sprite *spr,
bool on);
275 void snGhost(
Bitmap *bmp);
276 void snSay(
Sprite *spr,
int val);
289 GamePhase _gamePhase;
305 NotifyFunctionType _midiNotify;
306 NotifyFunctionType _spriteNotify;
324 V3D *_eyeTab[kSceneMax];
333 V3D *_point[kMaxPoint];
343 #endif // CGE2_CGE2_H
EngineFeature
Definition: engine.h:253
Definition: savefile.h:54
Definition: advancedDetector.h:163
Definition: cge2_main.h:36
Definition: serializer.h:79
SoundType
Definition: mixer.h:62
bool skipThumbnail(Common::SeekableReadStream &in)
Language
Definition: language.h:45