22 #ifndef MEDIASTATION_GRAPHICS_H 23 #define MEDIASTATION_GRAPHICS_H 25 #include "common/rect.h" 26 #include "common/array.h" 27 #include "graphics/managed_surface.h" 28 #include "graphics/screen.h" 30 #include "mediastation/clients.h" 31 #include "mediastation/mediascript/scriptvalue.h" 35 class MediaStationEngine;
36 struct DissolvePattern;
40 kUncompressedBlit = 0x00,
43 kUncompressedTransparentBlit = 0x08,
44 kPartialDissolve = 0x10,
47 kCccTransparentBlit = 0x80
51 kTransitionFadeToBlack = 300,
52 kTransitionFadeToPalette = 301,
53 kTransitionSetToPalette = 302,
54 kTransitionSetToBlack = 303,
55 kTransitionFadeToColor = 304,
56 kTransitionSetToColor = 305,
57 kTransitionSetToPercentOfPalette = 306,
58 kTransitionFadeToPaletteObject = 307,
59 kTransitionSetToPaletteObject = 308,
60 kTransitionSetToPercentOfPaletteObject = 309,
61 kTransitionColorShiftCurrentPalette = 310,
62 kTransitionCircleOut = 328
65 enum VideoDisplayManagerSectionType {
66 kVideoDisplayManagerUpdateDirty = 0x578,
67 kVideoDisplayManagerUpdateAll = 0x579,
68 kVideoDisplayManagerEffectTransition = 0x57a,
69 kVideoDisplayManagerSetTime = 0x57b,
70 kVideoDisplayManagerLoadPalette = 0x5aa,
78 virtual bool attemptToReadFromStream(
Chunk &chunk, uint sectionType)
override;
80 void updateScreen() { _screen->
update(); }
82 void setRegisteredPalette(
Graphics::Palette *palette) { _registeredPalette = palette; }
87 double dissolveFactor,
96 const double dissolveFactor,
101 void doTransitionOnSync();
103 void performUpdateDirty();
104 void performUpdateAll();
111 double _defaultTransitionTime = 0.0;
113 void readAndEffectTransition(
Chunk &chunk);
114 void readAndRegisterPalette(
Chunk &chunk);
124 void rleBlitRectsClip(
133 void dissolveBlitRectsClip(
138 const uint dissolveFactor);
139 void dissolveBlit1Rect(
146 void fullDeltaRleBlitRectsClip(
153 void deltaRleBlitRectsClip(
159 void deltaRleBlit1Rect(
162 const Bitmap *sourceImage,
167 const double DEFAULT_FADE_TRANSITION_TIME_IN_SECONDS = 0.5;
168 const byte DEFAULT_PALETTE_TRANSITION_START_INDEX = 0x01;
169 const byte DEFAULT_PALETTE_TRANSITION_COLOR_COUNT = 0xFE;
184 void _setPaletteToColor(
Graphics::Palette &targetPalette, byte r, byte g, byte b);
185 uint _limitColorRange(uint &startIndex, uint &colorCount);
186 byte _interpolateColorComponent(byte source, byte target,
double progress);
188 void _fadeToColor(byte r, byte g, byte b,
double fadeTime, uint startIndex, uint colorCount);
189 void _setToColor(byte r, byte g, byte b, uint startIndex, uint colorCount);
190 void _setPercentToColor(
double percent, byte r, byte g, byte b, uint startIndex, uint colorCount);
192 void _fadeToPalette(
double fadeTime,
Graphics::Palette &targetPalette, uint startIndex, uint colorCount);
194 uint startIndex, uint colorCount);
195 void _fadeToRegisteredPalette(
double fadeTime, uint startIndex, uint colorCount);
196 void _setToRegisteredPalette(uint startIndex, uint colorCount);
197 void _colorShiftCurrentPalette(uint startIndex, uint shiftAmount, uint colorCount);
198 void _fadeToPaletteObject(uint paletteId,
double fadeTime, uint startIndex, uint colorCount);
199 void _setToPaletteObject(uint paletteId, uint startIndex, uint colorCount);
200 void _setPercentToPaletteObject(
double percent, uint paletteId, uint startIndex, uint colorCount);
Definition: managed_surface.h:51
Simple class for handling a palette data.
Definition: palette.h:55