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" 69 kHypnoColorGreen = 251,
70 kHypnoColorWhiteOrBlue = 252,
71 kHypnoColorYellow = 253,
72 kHypnoColorBlack = 254,
78 kSpiderColorWhite = 248,
79 kSpiderColorBlue = 252,
96 kActionDifficultyChump,
97 kActionDifficultyPunk,
98 kActionDifficultyBadass,
146 bool _infiniteHealthCheat;
147 bool _infiniteAmmoCheat;
148 bool _unlockAllLevels;
149 bool _restoredContentEnabled;
158 virtual void resetSceneState();
159 bool checkSceneCompleted();
160 bool checkLevelWon();
162 void runScene(
Scene *scene);
167 virtual void runCode(
Code *code);
174 virtual void loadAssets();
195 virtual void loadGame(
const Common::String &nextLevel,
int score,
int puzzleDifficulty,
int combatDifficulty);
202 void adjustSubtitleSize();
207 void playVideo(
MVideo &video);
208 void skipVideo(
MVideo &video);
212 void loadImage(
const Common::String &file,
int x,
int y,
bool transparent,
bool palette =
false,
int frameNumber = 0);
215 void loadPalette(
const byte *palette, uint32 offset, uint32 size);
216 byte *getPalette(uint32 idx);
220 uint32 _defaultCursorIdx;
222 void disableCursor();
223 void defaultCursor();
224 virtual void changeCursor(
const Common::String &cursor, uint32 n,
bool centerCursor =
false);
226 virtual void changeCursor(
const Graphics::Surface &entry, byte *palette,
bool centerCursor =
false);
229 virtual void runMenu(
Hotspots *hs,
bool only_menu =
false);
232 void runMice(
Mice *a);
234 void runSave(
Save *a);
235 void runLoad(
Load *a);
237 void runTimer(
Timer *a);
238 void runQuit(
Quit *a);
240 void runIntro(
Intro *a);
241 void runPlay(
Play *a);
242 void runSound(
Sound *a);
245 void runWalN(
WalN *a);
246 bool runGlobal(
Global *a);
247 void runTalk(
Talk *a);
250 virtual void drawBackToMenu(
Hotspot *h);
253 int _screenW, _screenH;
257 uint32 _transparentColor;
259 void updateScreen(
MVideo &video);
260 void updateVideo(
MVideo &video);
264 void runIntro(
MVideo &video);
265 void runIntros(
Videos &videos);
281 Videos _nextSequentialVideoToPlay;
282 Videos _nextParallelVideoToPlay;
283 Videos _escapeSequentialVideoToPlay;
295 bool _doNotStopSounds;
296 void playSound(
const Filename &filename, uint32 loops, uint32 sampleRate = 22050,
bool stereo =
false);
303 virtual bool availableObjectives();
304 virtual bool checkArcadeObjectives();
310 virtual void pressedKey(
const int keycode);
311 virtual bool clickedPrimaryShoot(
const Common::Point &mousePos);
312 virtual bool clickedSecondaryShoot(
const Common::Point &mousePos);
315 virtual void hitPlayer();
319 virtual bool checkRButtonUp();
320 virtual void setRButtonUp(
const bool val);
321 virtual void disableGameKeymaps();
322 virtual void enableGameKeymaps();
327 uint32 _segmentOffset;
328 uint32 _segmentRepetition;
329 uint32 _segmentRepetitionMax;
330 uint32 _segmentShootSequenceOffset;
331 uint32 _segmentShootSequenceMax;
337 void resetStatistics();
339 void incShotsFired();
341 void incEnemyTargets();
342 void incTargetsDestroyed();
343 void incTargetsMissed();
344 void incFriendliesEncountered();
345 void incInfoReceived();
347 void incScore(
int inc);
348 void incBonus(
int inc);
351 uint32 accuracyRatio();
356 bool _skipDefeatVideo;
359 virtual void drawCursorArcade(
const Common::Point &mousePos);
360 virtual void drawPlayer();
361 virtual void drawHealth();
362 virtual void drawAmmo();
387 int _playerFrameStart;
393 uint32 _objKillsCount[2];
394 uint32 _objMissesCount[2];
395 uint32 _objKillsRequired[2];
396 uint32 _objMissesAllowed[2];
406 bool _refreshConversation;
407 virtual void showConversation();
408 virtual void endConversation();
409 virtual void rightClickedConversation(
const Common::Point &mousePos);
410 virtual void leftClickedConversation(
const Common::Point &mousePos);
411 virtual bool hoverConversation(
const Common::Point &mousePos);
413 virtual void showCredits();
418 bool _keepTimerDuringScenes;
420 bool startCountdown(uint32);
431 int objectivesPos[2];
445 void loadAssets()
override;
446 void loadAssetsDemoDisc();
447 void loadAssetsEarlyDemo();
448 void loadAssetsGen4();
449 void loadAssetsPCW();
450 void loadAssetsPCG();
451 void loadAssetsFullGame();
458 void showCredits()
override;
459 bool clickedSecondaryShoot(
const Common::Point &mousePos)
override;
461 void drawPlayer()
override;
462 void drawHealth()
override;
463 void drawAmmo()
override;
464 void hitPlayer()
override;
465 void drawCursorArcade(
const Common::Point &mousePos)
override;
470 void runCode(
Code *code)
override;
483 void pressedKey(
const int keycode)
override;
489 bool checkRButtonUp()
override;
490 void setRButtonUp(
const bool val)
override;
491 void disableGameKeymaps()
override;
492 void enableGameKeymaps()
override;
496 return (f == kSupportsReturnToLauncher);
502 void drawGlyph(
const Common::BitArray &font,
int x,
int y,
int bitoffset,
int width,
int height,
int pitch, uint32 color,
bool invert);
503 void drawKoreanChar(uint16 chr,
int &curx,
int y, uint32 color);
504 void runMainMenu(
Code *code);
505 void runLevelMenu(
Code *code);
506 void runCheckLives(
Code *code);
507 void endCredits(
Code *code);
508 void showDemoScore();
509 uint32 findPaletteIndexZones(uint32
id);
512 void restoreScoreMilestones(
int score);
513 bool checkScoreMilestones(
int score);
520 void generateStaticEffect();
536 void loadAssets()
override;
537 void loadAssetsDemo();
538 void loadAssetsFullGame();
539 void showCredits()
override;
541 void drawCursorArcade(
const Common::Point &mousePos)
override;
543 void drawPlayer()
override;
544 void drawHealth()
override;
546 void hitPlayer()
override;
549 void pressedKey(
const int keycode)
override;
556 void drawBackToMenu(
Hotspot *h)
override;
557 void runCode(
Code *code)
override;
564 void showConversation()
override;
565 void endConversation()
override;
566 void rightClickedConversation(
const Common::Point &mousePos)
override;
567 void leftClickedConversation(
const Common::Point &mousePos)
override;
568 bool hoverConversation(
const Common::Point &mousePos)
override;
570 void loadGame(
const Common::String &nextLevel,
int score,
int puzzleDifficulty,
int combatDifficulty)
override;
578 return (f == kSupportsSavingDuringRuntime || f == kSupportsLoadingDuringRuntime || f == kSupportsReturnToLauncher);
582 void runMatrix(
Code *code);
583 void addIngredient(
Code *code);
584 void checkMixture(
Code *code);
585 void runNote(
Code *code);
586 void runFusePanel(
Code *code);
587 void runRecept(
Code *code);
588 void runOffice(
Code *code);
589 void runFileCabinet(
Code *code);
590 void runLock(
Code *code);
591 void runFuseBox(
Code *code);
595 uint32 _currentPlayerPosition;
596 uint32 _lastPlayerPosition;
598 bool _fuseState[2][10] = {};
599 bool _isFuseRust =
true;
600 bool _isFuseUnreadable =
false;
601 bool ingredients[7] = {};
618 void loadAssets()
override;
619 void runCode(
Code *code)
override;
624 void resetSceneState()
override;
625 void runMenu(
Hotspots *hs,
bool only_menu =
false)
override;
631 void pressedKey(
const int keycode)
override;
633 void drawCursorArcade(
const Common::Point &mousePos)
override;
635 bool clickedSecondaryShoot(
const Common::Point &mousePos)
override;
636 void showCredits()
override;
638 void showArcadeStats(
int territory,
const ArcadeStats &data);
643 void drawHealth()
override;
644 void drawAmmo()
override;
646 void hitPlayer()
override;
647 void drawPlayer()
override;
662 void renderHighlights(
Hotspots *hs);
663 void waitForUserClick(uint32 timeout);
665 int _selectedCorrectBox;
666 char selectDirection();
668 void runMainMenu(
Code *code);
670 void runRetryMenu(
Code *code);
671 void runCheckC3(
Code *code);
672 void runCheckHo(
Code *code);
673 void runCheckC5(
Code *code);
674 void runAlarmC5(
Code *code);
675 void runDifficultyMenu(
Code *code);
676 void endCredits(
Code *code);
683 void unlockAllLevels();
695 int _weaponMaxAmmo[8];
697 byte *_crosshairsPalette;
705 void updateFromScript();
709 ScriptMode _currentMode;
710 uint32 _currentActor;
711 uint32 _currentWeapon;
721 return (f == kSupportsReturnToLauncher);
bool canSaveAutosaveCurrently() override
Definition: hypno.h:573
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:260
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: subtitles.h:77
Definition: grammar.h:228
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: hypno.h:196
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:198
Definition: grammar.h:132
bool hasFeature(EngineFeature f) const override
Definition: hypno.h:495
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:577
bool canSaveAutosaveCurrently() override
Definition: hypno.h:197
Definition: movie_decoder.h:32
Definition: grammar.h:395
Definition: grammar.h:170
Definition: grammar.h:294
Language
Definition: language.h:45