22#ifndef HOLLYWOOD_MONSTERS_SCENES_PRESENTATION_SCENE_H
23#define HOLLYWOOD_MONSTERS_SCENES_PRESENTATION_SCENE_H
25#include "common/array.h"
27#include "hollywood/monsters/graphics.h"
28#include "hollywood/monsters/scenes/animation_channels.h"
29#include "hollywood/monsters/scenes/animation_player.h"
30#include "hollywood/monsters/scenes/scene_resources.h"
31#include "hollywood/monsters/scenes/speech_overlay.h"
49 uint32 maximumSliceMillis = 10,
bool allowSkip =
true);
51 uint32 maximumSliceMillis = 10,
bool allowSkip =
true);
58 uint32 _durationMillis;
59 uint32 _maximumSliceMillis;
60 uint32 _elapsedMillis;
63 bool _durationLimited;
67 uint32 sceneFramebufferSize = kSceneBufferByteCount,
68 uint32 savedFramebufferSize = kSceneBufferByteCount);
71 virtual void stopAudio() {}
72 virtual void drawFrameOverlays();
73 virtual uint presentRowOffset()
const;
74 virtual uint presentXOffset()
const;
75 virtual int subtitleViewportYOffset()
const;
76 bool animationPlaybackShouldStop()
const override;
77 void presentAnimationFrame()
override;
78 bool waitForAnimationFrame(uint32 millis,
bool allowSkip)
override;
80 bool showAnchoredSubtitle(
const Common::String &text,
byte colorIndex,
81 int centerX,
int anchorBottomY,
82 SpeechOverlayWrapStyle wrapStyle = kSpeechOverlayAdaptiveWrap);
83 bool showAnchoredSubtitle(SpeechOverlay &overlay,
const Common::String &text,
84 byte colorIndex,
int centerX,
int anchorBottomY,
85 SpeechOverlayWrapStyle wrapStyle = kSpeechOverlayAdaptiveWrap);
86 bool showPositionedSubtitle(
const Common::String &text,
byte colorIndex,
87 int centerX,
int topY,
88 SpeechOverlayWrapStyle wrapStyle = kSpeechOverlayAdaptiveWrap);
89 bool showPositionedSubtitle(SpeechOverlay &overlay,
const Common::String &text,
90 byte colorIndex,
int centerX,
int topY,
91 SpeechOverlayWrapStyle wrapStyle = kSpeechOverlayAdaptiveWrap);
93 void clearSubtitle(SpeechOverlay &overlay);
95 bool loadFixedChunk(uint index, IndexedSurfaceBuffer &destination, uint fixedSize);
98 uint32 destinationOffset);
99 bool loadArenaChunk(uint index);
100 bool loadArenaChunk(uint archiveIndex, uint localChunkIndex);
101 bool loadArenaChunkAlias(uint sourceIndex, uint aliasIndex, uint targetIndex);
102 void drawResourceSpriteLayer(
const ResourceSpriteLayer &layer);
103 void drawLayerStack(SceneAnimationStratum stratum);
106 void presentFrame(uint rowOffset, uint xOffset);
107 virtual bool pollEvents(
bool allowSkip =
true);
108 bool delay(uint32 millis,
bool allowSkip =
true);
109 bool consumeStepAdvanceRequest();
111 bool revealSavedFramebufferWithCurtain(
byte bandWidth = 0x14);
112 bool clearSceneFramebufferWithCurtain(
byte bandWidth = 0x14);
113 void revealSavedFramebufferBand(uint sweepOffset,
byte bandWidth, uint xOffset = 0);
114 void clearSceneFramebufferBand(uint sweepOffset,
byte bandWidth);
115 void copySavedFramebufferRun(
int y,
int x,
int width);
116 void clearSceneFramebufferRun(
int y,
int x,
int width);
118 HollywoodEngine *_vm;
119 const char *_debugName;
120 SceneResources _resources;
121 SceneLayerStack _sceneLayers;
122 RealtimeAnimationTracks _realtimeAnimationTracks;
123 SceneAnimationPlayer _animationPlayer;
125 IndexedSurfaceBuffer _sceneFramebuffer;
126 IndexedSurfaceBuffer _savedFramebuffer;
128 Palette6Bit _displayPalette;
129 SpeechOverlay _subtitle;
131 bool _stepAdvanceRequested;
Definition: managed_surface.h:51
Definition: hollywood.h:47
Definition: presentation_scene.h:42
Definition: presentation_scene.h:38
Definition: animation_player.h:166