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/mediascript/scriptvalue.h" 34 class MediaStationEngine;
35 struct DissolvePattern;
39 kUncompressedBlit = 0x00,
42 kUncompressedTransparentBlit = 0x08,
43 kPartialDissolve = 0x10,
46 kCccTransparentBlit = 0x80
50 kTransitionFadeToBlack = 300,
51 kTransitionFadeToPalette = 301,
52 kTransitionSetToPalette = 302,
53 kTransitionSetToBlack = 303,
54 kTransitionFadeToColor = 304,
55 kTransitionSetToColor = 305,
56 kTransitionSetToPercentOfPalette = 306,
57 kTransitionFadeToPaletteObject = 307,
58 kTransitionSetToPaletteObject = 308,
59 kTransitionSetToPercentOfPaletteObject = 309,
60 kTransitionColorShiftCurrentPalette = 310,
61 kTransitionCircleOut = 328
69 void updateScreen() { _screen->
update(); }
71 void setRegisteredPalette(
Graphics::Palette *palette) { _registeredPalette = palette; }
76 const double dissolveFactor,
85 const double dissolveFactor,
90 void doTransitionOnSync();
93 static const uint SCREEN_WIDTH = 640;
94 static const uint SCREEN_HEIGHT = 480;
109 void rleBlitRectsClip(
118 void dissolveBlitRectsClip(
123 const uint dissolveFactor);
124 void dissolveBlit1Rect(
131 void fullDeltaRleBlitRectsClip(
138 void deltaRleBlitRectsClip(
144 void deltaRleBlit1Rect(
147 const Bitmap *sourceImage,
152 const double DEFAULT_FADE_TRANSITION_TIME_IN_SECONDS = 0.5;
153 const byte DEFAULT_PALETTE_TRANSITION_START_INDEX = 0x01;
154 const byte DEFAULT_PALETTE_TRANSITION_COLOR_COUNT = 0xFE;
169 void _setPaletteToColor(
Graphics::Palette &targetPalette, byte r, byte g, byte b);
170 uint _limitColorRange(uint &startIndex, uint &colorCount);
171 byte _interpolateColorComponent(byte source, byte target,
double progress);
173 void _fadeToColor(byte r, byte g, byte b,
double fadeTime, uint startIndex, uint colorCount);
174 void _setToColor(byte r, byte g, byte b, uint startIndex, uint colorCount);
175 void _setPercentToColor(
double percent, byte r, byte g, byte b, uint startIndex, uint colorCount);
177 void _fadeToPalette(
double fadeTime,
Graphics::Palette &targetPalette, uint startIndex, uint colorCount);
179 uint startIndex, uint colorCount);
180 void _fadeToRegisteredPalette(
double fadeTime, uint startIndex, uint colorCount);
181 void _setToRegisteredPalette(uint startIndex, uint colorCount);
182 void _colorShiftCurrentPalette(uint startIndex, uint shiftAmount, uint colorCount);
183 void _fadeToPaletteObject(uint paletteId,
double fadeTime, uint startIndex, uint colorCount);
184 void _setToPaletteObject(uint paletteId, uint startIndex, uint colorCount);
185 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