ScummVM API documentation
scene8420.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_RUNAWAY_SCENE8420_H
23#define HOLLYWOOD_RUNAWAY_SCENE8420_H
24
25#include "hollywood/runaway/scene.h"
26
27namespace Hollywood {
28namespace Runaway {
29
31public:
32 Scene8420(RunawayAudio &audio, RunawayInventory &inventory, const RunawayStrings &strings, RunawayGameType game);
33 void update(uint32 now, int scrollDirection, bool inventoryOpen) override;
34 bool canSave() const override { return false; }
35
36private:
37 enum Film { kNoFilm, kWakingUp, kConfession, kNightmare };
38
39 bool loadCustomResources() override;
40 void applyCustomHotspotState() override;
41 void prepareCustomGameplayLoop() override;
42 void runCustomEntrySequence() override;
43 void resumeAmbientAudio(bool entering) override;
44 void advanceCustomGameplayLoop(uint32 delta) override;
45 void drawCustomForegroundComposite(Graphics::ManagedSurface &viewport) override;
46 bool shouldDrawActor() const override { return _showBrian; }
47 bool shouldPlayGameplayClickPath() const override { return false; }
48 bool updateCustomSequence() override;
49 float actorHeight() const override;
50 void setupActorDepth(RunawayActor::RenderParams &params) const override;
51 ActionResult dispatchCustomSceneAction(uint16 action) override;
52 uint16 dialoguePlayerCue() const override { return 40; }
53 uint16 dialogueResponseCue() const override { return 50; }
54 void handleCustomDialogueChoice(byte effect) override;
55 void finishCustomConversation() override;
56 void finishCustomFilm() override;
57
58 void exchange(uint16 cue, byte first, byte last);
59 void startGinaConversation();
60 void startConfession();
61 void startNightmareMovement(byte first, byte last, uint16 nextAction);
62 void updateNightmareAudio();
63
64 RunawayAnimation _gina, _ambient[2], _dreamGina, _johnny;
65 Film _film = kNoFilm;
66 uint32 _ambientTick = 0, _ginaTick = 0;
67 byte _ambientFrame[2] = {}, _ginaFrame = 0, _johnnyFrame = 0;
68 byte _nightmareLast = 0, _lastScream = 0;
69 bool _showBrian = true, _waitingForGina = false, _dreaming = false, _screaming = false;
70 bool _nightmareMoving = false;
71 uint16 _destination = 8091;
72};
73
74} // End of namespace Runaway
75} // End of namespace Hollywood
76
77#endif // HOLLYWOOD_RUNAWAY_SCENE8420_H
Definition: managed_surface.h:51
Definition: scene8420.h:30
Definition: graphics.h:54
Definition: audio.h:29
Definition: inventory.h:41
Definition: scene.h:100
Definition: strings.h:37
Definition: graphics.h:76