ScummVM API documentation
scene5030.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_SCENE5030_H
23#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5030_H
24
25#include "hollywood/monsters/scenes/playable/playable_scene.h"
26
27namespace Hollywood {
28
29class HollywoodEngine;
30
31class Scene5030 : public PlayableScene {
32public:
34
35private:
36 struct ScoutDialogueRecords {
38 Common::Array<byte> companionReplyFrameIndices;
39 };
40
41 void initializeCustomPreviewState() override;
42 void drawCustomComposite(bool drawActiveActor, byte activeFacing, byte activeCel, int activeWorldX, int activeWorldY,
43 bool drawSecondaryActor, byte secondaryFacing, byte secondaryFrame, int secondaryWorldX, int secondaryWorldY,
44 byte actorDrawOrderMode) override;
45 void runCustomEntrySequence() override;
46 void runExitSideEffectsAfterLoop() override;
47 void advanceCustomGameplayLoop(uint32 delta) override;
48 bool dispatchCustomSceneAction(uint16 handlerId) override;
49 bool adjustCustomWalkTargetToFloorMask(int &targetX, int &targetY) const override;
50 bool applyCustomSceneStateToHotspotsAndPatches(byte selector) override;
51 AmbientAudioProfile ambientAudioProfile() const override;
52 void handleAnimationFrameHook(byte hookId, uint frame) override;
53 byte primarySpeechAnimationBaseFrame(byte animationGroup) const override;
54 byte primarySpeechAnimationFrameCount(byte animationGroup) const override;
55 uint32 primarySpeechAnimationFrameMillis(byte animationGroup) const override;
56 void setPrimarySpeechAnimationFrame(byte animationGroup, byte frameIndex) override;
57
58 void resetAnimationLayers();
59 void advanceLayer(TimedAnimationChannel &channel, uint layerIndex, uint frameCount, uint32 delta);
60 void advanceDialogueIdleLayer(TimedAnimationChannel &channel, uint layerIndex,
61 byte baseFrame, byte accentFrame, uint32 delta);
62 void advanceRonDialogueIdle(uint32 delta);
63 void advanceConcurrentPrimarySpeech(uint32 delta);
64 void advanceScoutTransitions(uint32 delta);
65 void startScoutStopTransition();
66 void startScoutResumeTransition();
67 void waitForScoutTransition();
68 void finishScoutStopTransition();
69 void finishScoutResumeTransition();
70 void showRonConversationLayer(uint chunkIndex, byte baseFrame);
71 void clearActorReplacementLayers();
72 void finishScoutConversation();
73 void runRonPoseTransition(bool faceGladys);
74 void runDeckRefusalSequence();
75 void runDeckPickupSequence();
76 void runUnderpantsPresentationAnimation();
77 void runUnderpantsHandoffAnimation();
78 void beginConversationMusicSuppression();
79 void runMineCartEntryAnimation();
80 void runExitToMineSwitches();
81 void runDeckOfCardsAction(bool fromUnderpantsExchange = false);
82 void runVanessaConversation();
83 void runGladysConversation();
84 void runSpecialInventorySequence();
85 void grantDeckOfCards();
86 void initializeVanessaDialogueRecords(ScoutDialogueRecords &dialogue) const;
87 void initializeGladysDialogueRecords(ScoutDialogueRecords &dialogue) const;
88 void setDialogueRecord(ScoutDialogueRecords &dialogue, uint index,
89 byte nextNodeIndex, byte transitionMode, byte playerTextRowId,
90 byte responseFrameIndex, byte disableAfterUse, byte companionReplyFrameIndex) const;
91 bool applyDialogueTransition(const DialogueChoiceRecord &record, byte &depthIndex, byte &nodeIndex) const;
92 void beginRonDialogueLine(uint16 rowIndex, byte frameIndex);
93 void beginVanessaSpeechLine(uint16 rowIndex, byte frameIndex);
94 void beginGladysSpeechLine(uint16 rowIndex, byte frameIndex);
95 bool startConcurrentPrimarySpeechCue(uint16 textRecordId, uint16 voiceSampleId,
96 uint16 centerX, uint16 topY, byte red, byte green, byte blue, byte animationGroup);
97 bool startConcurrentPrimarySpeechLine(uint16 rowIndex, byte frameIndex,
98 uint16 centerX, uint16 topY, byte red, byte green, byte blue, byte animationGroup);
99 bool waitForConcurrentPrimarySpeech();
100 void finishConcurrentPrimarySpeech();
101 void runScoutSpeechLineDuringRonTurn(bool gladys, uint16 rowIndex, byte frameIndex);
102 void copyStageSmallRowLabel(byte destinationRow, byte sourceRow);
103 void clearSceneItemFromColorMap(byte itemId);
104
105 uint _chunk8Track;
106 TimedAnimationChannel _chunk9Channel;
107 TimedAnimationChannel _chunk10Channel;
108 TimedAnimationChannel _ronDialogueIdleChannel;
109 bool _scoutStopTransitionActive;
110 bool _scoutResumeTransitionActive;
111 bool _scoutTransitionCompletionPending;
112 bool _scoutsInDialoguePose;
113 bool _musicSuppressed;
114 bool _concurrentPrimarySpeechActive;
115 uint32 _concurrentPrimarySpeechElapsed;
116 uint32 _concurrentPrimarySpeechDuration;
117 byte _ronSpeechBaseFrame;
118 uint _ronConversationChunk;
119};
120
121} // End of namespace Hollywood
122
123#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE5030_H
Definition: array.h:52
Definition: hollywood.h:47
Definition: playable_scene.h:84
Definition: scene5030.h:31
Definition: ambient_audio.h:44
Definition: dialogue_menu.h:33
Definition: animation_channels.h:34