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" 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();
288 virtual bool checkRButtonUp();
289 virtual void setRButtonUp(
const bool val);
294 uint32 _segmentOffset;
295 uint32 _segmentRepetition;
296 uint32 _segmentRepetitionMax;
297 uint32 _segmentShootSequenceOffset;
298 uint32 _segmentShootSequenceMax;
304 void resetStatistics();
306 void incShotsFired();
308 void incEnemyTargets();
309 void incTargetsDestroyed();
310 void incTargetsMissed();
311 void incFriendliesEncountered();
312 void incInfoReceived();
314 void incScore(
int inc);
315 void incBonus(
int inc);
318 uint32 accuracyRatio();
323 bool _skipDefeatVideo;
326 virtual void drawCursorArcade(
const Common::Point &mousePos);
327 virtual void drawPlayer();
328 virtual void drawHealth();
329 virtual void drawAmmo();
354 int _playerFrameStart;
360 uint32 _objKillsCount[2];
361 uint32 _objMissesCount[2];
362 uint32 _objKillsRequired[2];
363 uint32 _objMissesAllowed[2];
373 bool _refreshConversation;
374 virtual void showConversation();
375 virtual void endConversation();
376 virtual void rightClickedConversation(
const Common::Point &mousePos);
377 virtual void leftClickedConversation(
const Common::Point &mousePos);
378 virtual bool hoverConversation(
const Common::Point &mousePos);
380 virtual void showCredits();
385 bool _keepTimerDuringScenes;
387 bool startCountdown(uint32);
398 int objectivesPos[2];
412 void loadAssets()
override;
413 void loadAssetsDemoDisc();
414 void loadAssetsEarlyDemo();
415 void loadAssetsGen4();
416 void loadAssetsPCW();
417 void loadAssetsPCG();
418 void loadAssetsFullGame();
425 void showCredits()
override;
426 bool clickedSecondaryShoot(
const Common::Point &mousePos)
override;
428 void drawPlayer()
override;
429 void drawHealth()
override;
430 void drawAmmo()
override;
431 void hitPlayer()
override;
432 void drawCursorArcade(
const Common::Point &mousePos)
override;
437 void runCode(
Code *code)
override;
450 void pressedKey(
const int keycode)
override;
456 bool checkRButtonUp()
override;
457 void setRButtonUp(
const bool val)
override;
461 return (f == kSupportsReturnToLauncher);
467 void drawGlyph(
const Common::BitArray &font,
int x,
int y,
int bitoffset,
int width,
int height,
int pitch, uint32 color,
bool invert);
468 void drawKoreanChar(uint16 chr,
int &curx,
int y, uint32 color);
469 void runMainMenu(
Code *code);
470 void runLevelMenu(
Code *code);
471 void runCheckLives(
Code *code);
472 void endCredits(
Code *code);
473 void showDemoScore();
474 uint32 findPaletteIndexZones(uint32
id);
477 void restoreScoreMilestones(
int score);
478 bool checkScoreMilestones(
int score);
485 void generateStaticEffect();
501 void loadAssets()
override;
502 void loadAssetsDemo();
503 void loadAssetsFullGame();
504 void showCredits()
override;
506 void drawCursorArcade(
const Common::Point &mousePos)
override;
508 void drawPlayer()
override;
509 void drawHealth()
override;
511 void hitPlayer()
override;
514 void pressedKey(
const int keycode)
override;
521 void drawBackToMenu(
Hotspot *h)
override;
522 void runCode(
Code *code)
override;
529 void showConversation()
override;
530 void endConversation()
override;
531 void rightClickedConversation(
const Common::Point &mousePos)
override;
532 void leftClickedConversation(
const Common::Point &mousePos)
override;
533 bool hoverConversation(
const Common::Point &mousePos)
override;
535 void loadGame(
const Common::String &nextLevel,
int score,
int puzzleDifficulty,
int combatDifficulty)
override;
543 return (f == kSupportsSavingDuringRuntime || f == kSupportsLoadingDuringRuntime || f == kSupportsReturnToLauncher);
547 void runMatrix(
Code *code);
548 void addIngredient(
Code *code);
549 void checkMixture(
Code *code);
550 void runNote(
Code *code);
551 void runFusePanel(
Code *code);
552 void runRecept(
Code *code);
553 void runOffice(
Code *code);
554 void runFileCabinet(
Code *code);
555 void runLock(
Code *code);
556 void runFuseBox(
Code *code);
560 uint32 _currentPlayerPosition;
561 uint32 _lastPlayerPosition;
563 bool _fuseState[2][10] = {};
564 bool _isFuseRust =
true;
565 bool _isFuseUnreadable =
false;
566 bool ingredients[7] = {};
583 void loadAssets()
override;
584 void runCode(
Code *code)
override;
589 void resetSceneState()
override;
590 void runMenu(
Hotspots *hs,
bool only_menu =
false)
override;
596 void pressedKey(
const int keycode)
override;
598 void drawCursorArcade(
const Common::Point &mousePos)
override;
600 bool clickedSecondaryShoot(
const Common::Point &mousePos)
override;
601 void showCredits()
override;
603 void showArcadeStats(
int territory,
const ArcadeStats &data);
608 void drawHealth()
override;
609 void drawAmmo()
override;
611 void hitPlayer()
override;
612 void drawPlayer()
override;
627 void renderHighlights(
Hotspots *hs);
628 void waitForUserClick(uint32 timeout);
630 int _selectedCorrectBox;
631 char selectDirection();
633 void runMainMenu(
Code *code);
635 void runRetryMenu(
Code *code);
636 void runCheckC3(
Code *code);
637 void runCheckHo(
Code *code);
638 void runCheckC5(
Code *code);
639 void runAlarmC5(
Code *code);
640 void runDifficultyMenu(
Code *code);
641 void endCredits(
Code *code);
648 void unlockAllLevels();
660 int _weaponMaxAmmo[8];
662 byte *_crosshairsPalette;
670 void updateFromScript();
674 ScriptMode _currentMode;
675 uint32 _currentActor;
676 uint32 _currentWeapon;
686 return (f == kSupportsReturnToLauncher);
bool canSaveAutosaveCurrently() override
Definition: hypno.h:538
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:460
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:542
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