ScummVM API documentation
scene1060.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_SCENE1060_H
23#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1060_H
24
25#include "hollywood/monsters/scenes/playable/playable_scene.h"
26
27namespace Hollywood {
28
29class HollywoodEngine;
30
31class Scene1060 : public PlayableScene {
32public:
34
35private:
36 enum LayerId {
37 kLargeBackgroundLayer,
38 kInvisibleManLayer,
39 kFlyDoctorLayer,
40 kSmallLoopLayer,
41 kSmallTriggerLayer
42 };
43
44 void initializeCustomPreviewState() override;
45 void runCustomEntrySequence() override;
46 void prepareCustomGameplayLoop() override;
47 void advanceCustomGameplayLoop(uint32 delta) override;
48 void advancePrimarySpeechAnimation(uint32 delta) override;
49 bool dispatchCustomSceneAction(uint16 handlerId) override;
50 bool applyCustomSceneStateToHotspotsAndPatches(byte selector) override;
51 bool shouldAnimatePrimarySpeechLine() const override;
52 byte primarySpeechAnimationBaseFrame(byte animationGroup) const override;
53 void setPrimarySpeechAnimationFrame(byte animationGroup, byte frameIndex) override;
54 AmbientAudioProfile ambientAudioProfile() const override;
55
56 void resetAnimationLayers();
57 void advanceLargeBackground(uint32 delta);
58 void advanceFlyDoctorAmbientAudio();
59 void advanceFlyDoctorModeAndInvisibleMan(uint32 delta);
60 void advanceA06PrimaryDialogueSpeechFrame(uint32 delta);
61 void advanceFlyDoctor(uint32 delta);
62 void advanceFlyDoctorIdle(uint32 delta);
63 void advanceFlySlimeDrip(uint32 delta);
64 void advanceTicketPickupFrame(uint32 delta);
65 void advanceSmallTrigger(uint32 delta);
66 void restartSmallTriggerLayerFromFlyDoctorFrame(byte flyDoctorFrame);
67 byte juniorIdleFrame() const;
68 void runJuniorPoseTransition(bool opening);
69 void replaceColorMapItem(byte sourceItem, byte destinationItem);
70 void copyStageSmallRow(byte sourceRow, byte destinationRow);
71 byte pickRandomFrameExcluding(byte frameCount, byte previousFrame);
72 void prepareDrMoscaConversation();
73 void prepareInvisibleManConversation();
74 void runInvisibleManTransition(bool entering);
75 void runJuniorConversation();
76 void runDrMoscaConversation();
77 void runInvisibleManConversation();
78 void initializeDrMoscaDialogueRecords(Common::Array<DialogueChoiceRecord> &records) const;
79 void initializeInvisibleManDialogueRecords(Common::Array<DialogueChoiceRecord> &records) const;
80 void beginDrMoscaPrimarySpeech(byte frameIndex);
81 void beginInvisibleManPrimarySpeech(byte frameIndex, bool allowRandomTransition);
82 void finishCharacterConversation();
83 void handlePocketPaperPickup();
84 void runPocketPaperPickupSequence();
85 void handleCloakroomTicketPickup();
86 void handlePocketPaperLook();
87 void handleSkullcrackerExchange();
88 void handleFlySlimeExchange();
89 ResourceSpriteLayer &largeBackgroundLayer() { return _sceneLayers.layer(kLargeBackgroundLayer); }
90 ResourceSpriteLayer &invisibleManLayer() { return _sceneLayers.layer(kInvisibleManLayer); }
91 ResourceSpriteLayer &flyDoctorLayer() { return _sceneLayers.layer(kFlyDoctorLayer); }
92 ResourceSpriteLayer &smallLoopLayer() { return _sceneLayers.layer(kSmallLoopLayer); }
93 ResourceSpriteLayer &smallTriggerLayer() { return _sceneLayers.layer(kSmallTriggerLayer); }
94
95 TimedAnimationChannel _largeBackgroundChannel;
96 TimedAnimationChannel _invisibleManChannel;
97 TimedAnimationChannel _invisibleManRandomChannel;
98 TimedAnimationChannel _flyDoctorModeChannel;
99 TimedAnimationChannel _flyDoctorIdleChannel;
100 TimedAnimationChannel _flySlimeDripChannel;
101 TimedAnimationChannel _smallTriggerChannel;
102 uint _smallLoopTrack;
103 byte _largeBackgroundMode;
104 uint16 _largeBackgroundIdleCounter;
105 byte _flyDoctorMode;
106 byte _invisibleManMode;
107 byte _lastInvisibleManRandomFrame;
108 byte _lastFlyDoctorIdleFrame;
109 byte _lastFlyDoctorIdleSound;
110 byte _lastFlyDoctorDripSound;
111 byte _smallTriggerMode;
112 bool _ticketPickupSequenceActive;
113 bool _pocketPaperPickupSequenceActive;
114 bool _juniorPoseSequenceActive;
115 bool _juniorConversationActive;
116};
117
118} // End of namespace Hollywood
119
120#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE1060_H
Definition: array.h:52
Definition: hollywood.h:47
Definition: playable_scene.h:84
Definition: scene1060.h:31
Definition: ambient_audio.h:44
Definition: animation_layers.h:33
Definition: animation_channels.h:34