25 #include "common/array.h" 26 #include "common/compression/installshieldv3_archive.h" 27 #include "common/random.h" 28 #include "common/serializer.h" 29 #include "common/str-array.h" 30 #include "common/stream.h" 31 #include "engines/engine.h" 32 #include "graphics/font.h" 33 #include "graphics/fontman.h" 34 #include "graphics/surface.h" 36 #include "hypno/grammar.h" 37 #include "hypno/libfile.h" 49 kHypnoDebugMedia = 1 << 0,
50 kHypnoDebugParser = 1 << 1,
51 kHypnoDebugArcade = 1 << 2,
52 kHypnoDebugScene = 1 << 3
68 kHypnoColorGreen = 251,
69 kHypnoColorWhiteOrBlue = 252,
70 kHypnoColorYellow = 253,
71 kHypnoColorBlack = 254,
77 kSpiderColorWhite = 248,
78 kSpiderColorBlue = 252,
119 bool _infiniteHealthCheat;
120 bool _infiniteAmmoCheat;
121 bool _unlockAllLevels;
122 bool _restoredContentEnabled;
131 virtual void resetSceneState();
132 bool checkSceneCompleted();
133 bool checkLevelWon();
135 void runScene(
Scene *scene);
140 virtual void runCode(
Code *code);
147 virtual void loadAssets();
168 virtual void loadGame(
const Common::String &nextLevel,
int score,
int puzzleDifficulty,
int combatDifficulty);
176 void playVideo(
MVideo &video);
177 void skipVideo(
MVideo &video);
181 void loadImage(
const Common::String &file,
int x,
int y,
bool transparent,
bool palette =
false,
int frameNumber = 0);
184 void loadPalette(
const byte *palette, uint32 offset, uint32 size);
185 byte *getPalette(uint32 idx);
189 uint32 _defaultCursorIdx;
191 void disableCursor();
192 void defaultCursor();
193 virtual void changeCursor(
const Common::String &cursor, uint32 n,
bool centerCursor =
false);
195 virtual void changeCursor(
const Graphics::Surface &entry, byte *palette,
bool centerCursor =
false);
198 virtual void runMenu(
Hotspots *hs,
bool only_menu =
false);
201 void runMice(
Mice *a);
203 void runSave(
Save *a);
204 void runLoad(
Load *a);
206 void runTimer(
Timer *a);
207 void runQuit(
Quit *a);
209 void runIntro(
Intro *a);
210 void runPlay(
Play *a);
211 void runSound(
Sound *a);
214 void runWalN(
WalN *a);
215 bool runGlobal(
Global *a);
216 void runTalk(
Talk *a);
219 virtual void drawBackToMenu(
Hotspot *h);
222 int _screenW, _screenH;
226 uint32 _transparentColor;
228 void updateScreen(
MVideo &video);
229 void updateVideo(
MVideo &video);
233 void runIntro(
MVideo &video);
234 void runIntros(
Videos &videos);
250 Videos _nextSequentialVideoToPlay;
251 Videos _nextParallelVideoToPlay;
252 Videos _escapeSequentialVideoToPlay;
264 bool _doNotStopSounds;
265 void playSound(
const Filename &filename, uint32 loops, uint32 sampleRate = 22050,
bool stereo =
false);
272 virtual bool availableObjectives();
273 virtual bool checkArcadeObjectives();
279 virtual void pressedKey(
const int keycode);
280 virtual bool clickedPrimaryShoot(
const Common::Point &mousePos);
281 virtual bool clickedSecondaryShoot(
const Common::Point &mousePos);
284 virtual void hitPlayer();
292 uint32 _segmentOffset;
293 uint32 _segmentRepetition;
294 uint32 _segmentRepetitionMax;
295 uint32 _segmentShootSequenceOffset;
296 uint32 _segmentShootSequenceMax;
302 void resetStatistics();
304 void incShotsFired();
306 void incEnemyTargets();
307 void incTargetsDestroyed();
308 void incTargetsMissed();
309 void incFriendliesEncountered();
310 void incInfoReceived();
312 void incScore(
int inc);
313 void incBonus(
int inc);
316 uint32 accuracyRatio();
321 bool _skipDefeatVideo;
324 virtual void drawCursorArcade(
const Common::Point &mousePos);
325 virtual void drawPlayer();
326 virtual void drawHealth();
327 virtual void drawAmmo();
352 int _playerFrameStart;
358 uint32 _objKillsCount[2];
359 uint32 _objMissesCount[2];
360 uint32 _objKillsRequired[2];
361 uint32 _objMissesAllowed[2];
371 bool _refreshConversation;
372 virtual void showConversation();
373 virtual void endConversation();
374 virtual void rightClickedConversation(
const Common::Point &mousePos);
375 virtual void leftClickedConversation(
const Common::Point &mousePos);
376 virtual bool hoverConversation(
const Common::Point &mousePos);
378 virtual void showCredits();
383 bool _keepTimerDuringScenes;
385 bool startCountdown(uint32);
396 int objectivesPos[2];
410 void loadAssets()
override;
411 void loadAssetsDemoDisc();
412 void loadAssetsEarlyDemo();
413 void loadAssetsGen4();
414 void loadAssetsPCW();
415 void loadAssetsPCG();
416 void loadAssetsFullGame();
423 void showCredits()
override;
424 bool clickedSecondaryShoot(
const Common::Point &mousePos)
override;
426 void drawPlayer()
override;
427 void drawHealth()
override;
428 void drawAmmo()
override;
429 void hitPlayer()
override;
430 void drawCursorArcade(
const Common::Point &mousePos)
override;
435 void runCode(
Code *code)
override;
448 void pressedKey(
const int keycode)
override;
456 return (f == kSupportsReturnToLauncher);
462 void drawGlyph(
const Common::BitArray &font,
int x,
int y,
int bitoffset,
int width,
int height,
int pitch, uint32 color,
bool invert);
463 void drawKoreanChar(uint16 chr,
int &curx,
int y, uint32 color);
464 void runMainMenu(
Code *code);
465 void runLevelMenu(
Code *code);
466 void runCheckLives(
Code *code);
467 void endCredits(
Code *code);
468 void showDemoScore();
469 uint32 findPaletteIndexZones(uint32
id);
472 void restoreScoreMilestones(
int score);
473 bool checkScoreMilestones(
int score);
480 void generateStaticEffect();
494 void loadAssets()
override;
495 void loadAssetsDemo();
496 void loadAssetsFullGame();
497 void showCredits()
override;
499 void drawCursorArcade(
const Common::Point &mousePos)
override;
501 void drawPlayer()
override;
502 void drawHealth()
override;
504 void hitPlayer()
override;
507 void pressedKey(
const int keycode)
override;
514 void drawBackToMenu(
Hotspot *h)
override;
515 void runCode(
Code *code)
override;
522 void showConversation()
override;
523 void endConversation()
override;
524 void rightClickedConversation(
const Common::Point &mousePos)
override;
525 void leftClickedConversation(
const Common::Point &mousePos)
override;
526 bool hoverConversation(
const Common::Point &mousePos)
override;
528 void loadGame(
const Common::String &nextLevel,
int score,
int puzzleDifficulty,
int combatDifficulty)
override;
536 return (f == kSupportsSavingDuringRuntime || f == kSupportsLoadingDuringRuntime || f == kSupportsReturnToLauncher);
540 void runMatrix(
Code *code);
541 void addIngredient(
Code *code);
542 void checkMixture(
Code *code);
543 void runNote(
Code *code);
544 void runFusePanel(
Code *code);
545 void runRecept(
Code *code);
546 void runOffice(
Code *code);
547 void runFileCabinet(
Code *code);
548 void runLock(
Code *code);
549 void runFuseBox(
Code *code);
553 uint32 _currentPlayerPosition;
554 uint32 _lastPlayerPosition;
556 bool _fuseState[2][10] = {};
557 bool _isFuseRust =
true;
558 bool _isFuseUnreadable =
false;
559 bool ingredients[7] = {};
576 void loadAssets()
override;
577 void runCode(
Code *code)
override;
582 void resetSceneState()
override;
583 void runMenu(
Hotspots *hs,
bool only_menu =
false)
override;
589 void pressedKey(
const int keycode)
override;
591 void drawCursorArcade(
const Common::Point &mousePos)
override;
593 bool clickedSecondaryShoot(
const Common::Point &mousePos)
override;
594 void showCredits()
override;
596 void showArcadeStats(
int territory,
const ArcadeStats &data);
601 void drawHealth()
override;
602 void drawAmmo()
override;
604 void hitPlayer()
override;
605 void drawPlayer()
override;
620 void renderHighlights(
Hotspots *hs);
621 void waitForUserClick(uint32 timeout);
623 int _selectedCorrectBox;
624 char selectDirection();
626 void runMainMenu(
Code *code);
628 void runRetryMenu(
Code *code);
629 void runCheckC3(
Code *code);
630 void runCheckHo(
Code *code);
631 void runCheckC5(
Code *code);
632 void runAlarmC5(
Code *code);
633 void runDifficultyMenu(
Code *code);
634 void endCredits(
Code *code);
641 void unlockAllLevels();
653 int _weaponMaxAmmo[8];
655 byte *_crosshairsPalette;
663 void updateFromScript();
667 ScriptMode _currentMode;
668 uint32 _currentActor;
669 uint32 _currentWeapon;
679 return (f == kSupportsReturnToLauncher);
bool canSaveAutosaveCurrently() override
Definition: hypno.h:531
Definition: grammar.h:732
Definition: image_decoder.h:52
Definition: grammar.h:333
Definition: installshieldv3_archive.h:35
Definition: grammar.h:359
EngineFeature
Definition: engine.h:253
Definition: grammar.h:121
Definition: grammar.h:221
Definition: grammar.h:244
Definition: grammar.h:440
Definition: grammar.h:152
Definition: advancedDetector.h:163
Definition: grammar.h:214
Definition: grammar.h:235
Definition: grammar.h:707
Definition: grammar.h:228
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: hypno.h:169
Definition: grammar.h:187
Definition: grammar.h:262
Definition: grammar.h:311
Definition: bitarray.h:29
Definition: grammar.h:253
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: hypno.h:171
Definition: grammar.h:132
bool hasFeature(EngineFeature f) const override
Definition: hypno.h:455
Definition: grammar.h:600
Definition: grammar.h:745
Definition: grammar.h:141
Definition: grammar.h:277
Definition: grammar.h:207
Definition: grammar.h:104
bool hasFeature(EngineFeature f) const override
Definition: hypno.h:535
bool canSaveAutosaveCurrently() override
Definition: hypno.h:170
Definition: movie_decoder.h:32
Definition: grammar.h:395
Definition: grammar.h:170
Definition: grammar.h:294
Language
Definition: language.h:45