ScummVM API documentation
scene2020.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_SCENE2020_H
23#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2020_H
24
25#include "hollywood/monsters/scenes/playable/playable_scene.h"
26
27namespace Hollywood {
28
29class HollywoodEngine;
30
31class Scene2020 : public PlayableScene {
32public:
34
35private:
36 enum LayerId {
37 kPoolLayer,
38 kTigerLayer,
39 kPrincessLayer,
40 kTigerItemEffectLayer
41 };
42
43 void initializeCustomPreviewState() override;
44 void runCustomEntrySequence() override;
45 void advanceCustomGameplayLoop(uint32 delta) override;
46 bool dispatchCustomSceneAction(uint16 handlerId) override;
47 bool applyCustomSceneStateToHotspotsAndPatches(byte selector) override;
48 byte primarySpeechAnimationBaseFrame(byte animationGroup) const override;
49 byte primarySpeechAnimationFrameCount(byte animationGroup) const override;
50 uint32 primarySpeechAnimationFrameMillis(byte animationGroup) const override;
51 void setPrimarySpeechAnimationFrame(byte animationGroup, byte frameIndex) override;
52 AmbientAudioProfile ambientAudioProfile() const override;
53
54 void resetAnimationLayers();
55 void advanceTigerLayer(uint32 delta);
56 void advanceTigerIdleFrame();
57 void advanceTigerItemSequence(uint32 delta);
58 void advancePrincessIdleLayer(uint32 delta, bool canStartLongSequence);
59 bool advancePaletteCycle(uint32 delta);
60 void rotatePoolPalette();
61 void runEntryFromExterior();
62 void runPrincessExitCutscene();
63 bool runCurtainRevealFromBlack();
64 void runCurtainClearToBlack();
65 bool waitPrincessDepartureFrame(uint32 millis, byte clipFrame);
66 void redrawPrincessDepartureFrame(byte clipFrame, bool poolChanged, bool tigerChanged);
67 void runPrincessSpeechTransition(bool opening);
68 void beginPrincessSpeechLine(byte frameIndex);
69 void runPrincessDialogue();
70 void initializePrincessDialogueRecords(Common::Array<DialogueChoiceRecord> &records) const;
71 void setDialogueRecord(Common::Array<DialogueChoiceRecord> &records, uint index,
72 byte enabled, byte nextNodeIndex, byte transitionMode, byte playerTextRowId,
73 byte responseFrameIndex, byte disableAfterUse) const;
74 void runHatPickup();
75 void runSunglassesPickup();
76 void runTigerToothPickup();
77 void runSteakOnTigerSequence();
78 void runLabItemOnTigerSequence();
79 bool runTigerItemOverlaySequence(bool withEffect);
80 void replaceColorMapItem(byte sourceItem, byte destinationItem);
81 void restoreOriginalColorMapItem(byte itemId);
82 void remapOriginalColorMapItems(byte firstSourceItem, byte secondSourceItem, byte destinationItem);
83 byte originalColorMapItemAt(uint paletteIndex) const;
84 ResourceSpriteLayer &poolLayer() { return _sceneLayers.layer(kPoolLayer); }
85 ResourceSpriteLayer &tigerLayer() { return _sceneLayers.layer(kTigerLayer); }
86 ResourceSpriteLayer &princessLayer() { return _sceneLayers.layer(kPrincessLayer); }
87 ResourceSpriteLayer &tigerItemEffectLayer() { return _sceneLayers.layer(kTigerItemEffectLayer); }
88
89 uint _poolTrack;
90 TimedAnimationChannel _tigerChannel;
91 TimedAnimationChannel _princessChannel;
92 TimedAnimationChannel _paletteCycleChannel;
93 TimedAnimationChannel _tigerItemActorChannel;
94 TimedAnimationChannel _tigerItemEffectChannel;
95 byte _tigerAnimationState;
96 byte _princessAnimationState;
97 bool _princessSpeechTransitionActive;
98 bool _princessLongIdleAllowed;
99 bool _tigerItemSequenceActive;
100 bool _tigerItemSequenceFinished;
101 bool _tigerItemEffectEnabled;
102 bool _tigerReactionStarted;
103};
104
105} // End of namespace Hollywood
106
107#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE2020_H
Definition: array.h:52
Definition: hollywood.h:47
Definition: playable_scene.h:84
Definition: scene2020.h:31
Definition: ambient_audio.h:44
Definition: animation_layers.h:33
Definition: animation_channels.h:34