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" 35 #include "video/subtitles.h" 37 #include "hypno/grammar.h" 38 #include "hypno/libfile.h" 41 class SeekableAudioStream;
73 kHypnoColorGreen = 251,
74 kHypnoColorWhiteOrBlue = 252,
75 kHypnoColorYellow = 253,
76 kHypnoColorBlack = 254,
82 kSpiderColorWhite = 248,
83 kSpiderColorBlue = 252,
100 kActionDifficultyChump,
101 kActionDifficultyPunk,
102 kActionDifficultyBadass,
103 kActionDifficultExit,
150 bool _infiniteHealthCheat;
151 bool _infiniteAmmoCheat;
152 bool _unlockAllLevels;
153 bool _restoredContentEnabled;
162 virtual void resetSceneState();
163 bool checkSceneCompleted();
164 bool checkLevelWon();
166 void runScene(
Scene *scene);
171 virtual void runCode(
Code *code);
178 virtual void loadAssets();
199 virtual void loadGame(
const Common::String &nextLevel,
int score,
int puzzleDifficulty,
int combatDifficulty);
207 void adjustSubtitleSize();
212 void playVideo(
MVideo &video);
213 void skipVideo(
MVideo &video);
217 void loadImage(
const Common::String &file,
int x,
int y,
bool transparent,
bool palette =
false,
int frameNumber = 0);
220 void loadPalette(
const byte *palette, uint32 offset, uint32 size);
221 byte *getPalette(uint32 idx);
225 uint32 _defaultCursorIdx;
227 void disableCursor();
228 void defaultCursor();
229 virtual void changeCursor(
const Common::String &cursor, uint32 n,
bool centerCursor =
false);
231 virtual void changeCursor(
const Graphics::Surface &entry, byte *palette,
bool centerCursor =
false);
234 virtual void runMenu(
Hotspots *hs,
bool only_menu =
false);
237 void runMice(
Mice *a);
239 void runSave(
Save *a);
240 void runLoad(
Load *a);
242 void runTimer(
Timer *a);
243 void runQuit(
Quit *a);
245 void runIntro(
Intro *a);
246 void runPlay(
Play *a);
247 void runSound(
Sound *a);
250 void runWalN(
WalN *a);
251 bool runGlobal(
Global *a);
252 void runTalk(
Talk *a);
255 virtual void drawBackToMenu(
Hotspot *h);
258 int _screenW, _screenH;
262 uint32 _transparentColor;
264 void updateScreen(
MVideo &video);
265 void updateVideo(
MVideo &video);
269 void runIntro(
MVideo &video);
270 void runIntros(
Videos &videos);
286 Videos _nextSequentialVideoToPlay;
287 Videos _nextParallelVideoToPlay;
288 Videos _escapeSequentialVideoToPlay;
298 void playSound(
const Filename &filename, uint32 loops, uint32 sampleRate = 22050,
bool stereo =
false);
299 void playMusic(
const Filename &filename, uint32 sampleRate = 22050,
bool stereo =
false);
302 bool isMusicActive();
308 virtual bool availableObjectives();
309 virtual bool checkArcadeObjectives();
315 virtual void pressedKey(
const int keycode);
316 virtual bool clickedPrimaryShoot(
const Common::Point &mousePos);
317 virtual bool clickedSecondaryShoot(
const Common::Point &mousePos);
320 virtual void hitPlayer();
324 virtual bool checkRButtonUp();
325 virtual void setRButtonUp(
const bool val);
326 virtual void disableGameKeymaps();
327 virtual void enableGameKeymaps();
332 uint32 _segmentOffset;
333 uint32 _segmentRepetition;
334 uint32 _segmentRepetitionMax;
335 uint32 _segmentShootSequenceOffset;
336 uint32 _segmentShootSequenceMax;
342 void resetStatistics();
344 void incShotsFired();
346 void incEnemyTargets();
347 void incTargetsDestroyed();
348 void incTargetsMissed();
349 void incFriendliesEncountered();
350 void incInfoReceived();
352 void incScore(
int inc);
353 void incBonus(
int inc);
356 uint32 accuracyRatio();
361 bool _skipDefeatVideo;
364 virtual void drawCursorArcade(
const Common::Point &mousePos);
365 virtual void drawPlayer();
366 virtual void drawHealth();
367 virtual void drawAmmo();
392 int _playerFrameStart;
398 uint32 _objKillsCount[2];
399 uint32 _objMissesCount[2];
400 uint32 _objKillsRequired[2];
401 uint32 _objMissesAllowed[2];
411 bool _refreshConversation;
412 virtual void showConversation();
413 virtual void endConversation();
414 virtual void rightClickedConversation(
const Common::Point &mousePos);
415 virtual void leftClickedConversation(
const Common::Point &mousePos);
416 virtual bool hoverConversation(
const Common::Point &mousePos);
418 virtual void showCredits();
423 bool _keepTimerDuringScenes;
425 bool startCountdown(uint32);
436 int objectivesPos[2];
451 void loadAssets()
override;
452 void loadAssetsDemoDisc();
453 void loadAssetsEarlyDemo();
454 void loadAssetsGen4();
455 void loadAssetsPCW();
456 void loadAssetsPCG();
457 void loadAssetsFullGame();
464 void showCredits()
override;
465 bool clickedSecondaryShoot(
const Common::Point &mousePos)
override;
467 void drawPlayer()
override;
468 void drawHealth()
override;
469 void drawAmmo()
override;
470 void hitPlayer()
override;
471 void drawCursorArcade(
const Common::Point &mousePos)
override;
476 void runCode(
Code *code)
override;
489 void pressedKey(
const int keycode)
override;
495 bool checkRButtonUp()
override;
496 void setRButtonUp(
const bool val)
override;
497 void disableGameKeymaps()
override;
498 void enableGameKeymaps()
override;
502 return (f == kSupportsReturnToLauncher);
508 void drawGlyph(
const Common::BitArray &font,
int x,
int y,
int bitoffset,
int width,
int height,
int pitch, uint32 color,
bool invert);
509 void drawKoreanChar(uint16 chr,
int &curx,
int y, uint32 color);
510 void runMainMenu(
Code *code);
511 void runLevelMenu(
Code *code);
512 void runCheckLives(
Code *code);
513 void endCredits(
Code *code);
514 void showDemoScore();
515 uint32 findPaletteIndexZones(uint32
id);
518 void restoreScoreMilestones(
int score);
519 bool checkScoreMilestones(
int score);
526 void generateStaticEffect();
543 void loadAssets()
override;
544 void loadAssetsDemo();
545 void loadAssetsFullGame();
546 void showCredits()
override;
548 void drawCursorArcade(
const Common::Point &mousePos)
override;
550 void drawPlayer()
override;
551 void drawHealth()
override;
553 void hitPlayer()
override;
556 void pressedKey(
const int keycode)
override;
563 void drawBackToMenu(
Hotspot *h)
override;
564 void runCode(
Code *code)
override;
571 void showConversation()
override;
572 void endConversation()
override;
573 void rightClickedConversation(
const Common::Point &mousePos)
override;
574 void leftClickedConversation(
const Common::Point &mousePos)
override;
575 bool hoverConversation(
const Common::Point &mousePos)
override;
577 void loadGame(
const Common::String &nextLevel,
int score,
int puzzleDifficulty,
int combatDifficulty)
override;
585 return (f == kSupportsSavingDuringRuntime || f == kSupportsLoadingDuringRuntime || f == kSupportsReturnToLauncher);
589 void runMatrix(
Code *code);
590 void addIngredient(
Code *code);
591 void checkMixture(
Code *code);
592 void runNote(
Code *code);
593 void runFusePanel(
Code *code);
594 void runRecept(
Code *code);
595 void runOffice(
Code *code);
596 void runFileCabinet(
Code *code);
597 void runLock(
Code *code);
598 void runFuseBox(
Code *code);
602 uint32 _currentPlayerPosition;
603 uint32 _lastPlayerPosition;
605 bool _fuseState[2][10] = {};
606 bool _isFuseRust =
true;
607 bool _isFuseUnreadable =
false;
608 bool ingredients[7] = {};
625 void loadAssets()
override;
626 void runCode(
Code *code)
override;
631 void resetSceneState()
override;
632 void runMenu(
Hotspots *hs,
bool only_menu =
false)
override;
638 void pressedKey(
const int keycode)
override;
640 void drawCursorArcade(
const Common::Point &mousePos)
override;
642 bool clickedSecondaryShoot(
const Common::Point &mousePos)
override;
643 void showCredits()
override;
645 void showArcadeStats(
int territory,
const ArcadeStats &data);
650 void drawHealth()
override;
651 void drawAmmo()
override;
653 void hitPlayer()
override;
654 void drawPlayer()
override;
669 void renderHighlights(
Hotspots *hs);
670 void waitForUserClick(uint32 timeout);
672 int _selectedCorrectBox;
673 char selectDirection();
675 void runMainMenu(
Code *code);
677 void runRetryMenu(
Code *code);
678 void runCheckC3(
Code *code);
679 void runCheckHo(
Code *code);
680 void runCheckC5(
Code *code);
681 void runAlarmC5(
Code *code);
682 void runDifficultyMenu(
Code *code);
683 void endCredits(
Code *code);
690 void unlockAllLevels();
702 int _weaponMaxAmmo[8];
704 byte *_crosshairsPalette;
712 void updateFromScript();
716 ScriptMode _currentMode;
717 uint32 _currentActor;
718 uint32 _currentWeapon;
728 return (f == kSupportsReturnToLauncher);
bool canSaveAutosaveCurrently() override
Definition: hypno.h:580
Definition: grammar.h:732
Definition: image_decoder.h:53
Definition: grammar.h:333
Definition: installshieldv3_archive.h:35
Definition: grammar.h:359
EngineFeature
Definition: engine.h:258
Definition: grammar.h:121
Definition: grammar.h:221
Definition: grammar.h:244
Definition: grammar.h:440
Definition: grammar.h:152
Definition: advancedDetector.h:164
Definition: grammar.h:214
Definition: grammar.h:235
Definition: grammar.h:707
Definition: audiostream.h:212
Definition: subtitles.h:77
Definition: grammar.h:228
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: hypno.h:200
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:202
Definition: grammar.h:132
bool hasFeature(EngineFeature f) const override
Definition: hypno.h:501
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:584
bool canSaveAutosaveCurrently() override
Definition: hypno.h:201
Definition: movie_decoder.h:32
Definition: grammar.h:395
Definition: grammar.h:170
Definition: grammar.h:294
Language
Definition: language.h:45