ScummVM API documentation
scene8010.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE8010_H
23#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE8010_H
24
25#include "common/str.h"
26
27#include "hollywood/monsters/scenes/playable/playable_scene.h"
28
29namespace Hollywood {
30
31class HollywoodEngine;
32
33class Scene8010 : public PlayableScene {
34public:
36
37private:
38 struct FishermanQuizEntry {
39 byte promptStage;
40 byte promptRow;
41 byte promptSuffixStage;
42 byte promptSuffixRow;
43 byte menuStage;
44 byte menuRow;
45 byte menuSuffixStage;
46 byte menuSuffixRow;
47 };
48
49 void initializeCustomPreviewState() override;
50 void drawCustomActorForegroundComposite(int activeWorldX, int activeWorldY,
51 byte actorDrawOrderMode) override;
52 void runCustomEntrySequence() override;
53 void advanceCustomGameplayLoop(uint32 delta) override;
54 void advanceAmbientAudio(uint32 delta) override;
55 bool dispatchCustomSceneAction(uint16 handlerId) override;
56 bool adjustCustomWalkTargetToFloorMask(int &targetX, int &targetY) const override;
57 Common::String dialogueMenuText(byte stageId, byte textRowId) const override;
58 bool applyCustomSceneStateToHotspotsAndPatches(byte selector) override;
59 byte primarySpeechAnimationBaseFrame(byte animationGroup) const override;
60 uint32 primarySpeechAnimationFrameMillis(byte animationGroup) const override;
61 void setPrimarySpeechAnimationFrame(byte animationGroup, byte frameIndex) override;
62 void primarySpeechAnimationRestored(byte animationGroup, byte baseFrame) override;
63 AmbientAudioProfile ambientAudioProfile() const override;
64 void runExitSideEffectsAfterLoop() override;
65
66 void resetSceneAnimations();
67 void advanceFishermanIdle(uint32 delta);
68 bool waitTransitionFrameMillis(uint32 millis);
69 void drawTransitionClip(uint chunkIndex, bool showFirstFrameImmediately);
70 void runFirstEntry();
71 void runReturnEntryTransition();
72 bool enterFishermanConversationPose();
73 void leaveFishermanConversationPose();
74 void beginFishermanSpeechLine(byte frameIndex);
75 void runFishermanConversation();
76 void runExitToScene8020();
77 void runTravelScreenAction();
78 void applyFishermanNameTextPatch();
79 void initializeFishermanQuizData(byte targetLineIndex);
80 Common::String composeFishermanQuizChoice(byte firstStage, byte firstRow, byte secondStage, byte secondRow) const;
81 void composeFishermanGeneratedPromptLines(byte promptLineIndex, Common::Array<Common::String> &lines) const;
82 uint16 fishermanQuizFragmentVoiceSampleId(const FishermanQuizEntry &entry, byte fragmentIndex) const;
83 bool waitFishermanQuizFragmentVoices(const FishermanQuizEntry &entry, byte firstFragment,
84 uint16 centerX, uint32 fallbackMillis);
85 bool runFishermanGeneratedPrimarySpeechLine(byte promptLineIndex);
86 void runFishermanGeneratedPromptSpeech();
87 void runFishermanSelectedAnswerSpeech(byte selectedLine);
88 byte chooseFishermanQuizLine();
89 void updateFishermanQuizMenuHover(DialogueMenuState &state);
90 byte fishermanQuizMenuLineAt(uint16 cursorY, const DialogueMenuState &state) const;
91 byte randomUnusedRow(byte firstRow, byte rowCount, bool *usedRows, uint usedRowCount);
92 bool runFishermanQuiz();
93
94 uint _boatTrack;
95 TimedAnimationChannel _fishermanChannel;
96 TimedAnimationChannel _fishermanSpeechIdleChannel;
97 TimedAnimationChannel _secondaryAmbientChannel;
98 FishermanQuizEntry _fishermanQuizEntries[8];
99 FishermanQuizEntry _fishermanQuizFinalEntry;
100 Common::String _fishermanQuizChoiceText[8];
101 byte _fishermanQuizChoiceEntryIndex[8];
102 byte _fishermanState;
103 byte _fishermanRepeatCount;
104 byte _previousSecondaryAmbientCue;
105 bool _fishermanQuizAlternatePattern;
106};
107
108} // End of namespace Hollywood
109
110#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE8010_H
Definition: str.h:59
Definition: hollywood.h:47
Definition: playable_scene.h:84
Definition: scene8010.h:33
Definition: ambient_audio.h:44
Definition: dialogue_menu.h:50
Definition: animation_channels.h:34