22 #ifndef MOHAWK_RIVEN_GRAPHICS_H 23 #define MOHAWK_RIVEN_GRAPHICS_H 25 #include "mohawk/graphics.h" 26 #include "mohawk/riven_graphics_detection_enums.h" 28 #include "common/ustr.h" 36 class MohawkEngine_Riven;
40 enum RivenTransition {
41 kRivenTransitionNone = -1,
42 kRivenTransitionWipeLeft = 0,
43 kRivenTransitionWipeRight = 1,
44 kRivenTransitionWipeUp = 2,
45 kRivenTransitionWipeDown = 3,
46 kRivenTransitionPanLeft = 12,
47 kRivenTransitionPanRight = 13,
48 kRivenTransitionPanUp = 14,
49 kRivenTransitionPanDown = 15,
50 kRivenTransitionBlend = 16,
51 kRivenTransitionBlend2 = 17
54 enum RivenCreditsImageNumber {
55 kRivenCreditsZeroImage = 302,
56 kRivenCreditsFirstImage = 303,
57 kRivenCreditsSecondImage = 304,
58 kRivenCreditsLastImage = 320
67 void beginScreenUpdate();
68 void applyScreenUpdate(
bool force =
false);
69 void enableCardUpdateScript(
bool enable);
71 void copyImageToScreen(uint16 image, uint32 left, uint32 top, uint32 right, uint32 bottom);
74 void drawExtrasImage(uint16
id,
const Common::Rect &dstRect);
75 void drawExtrasImageToScreen(uint16
id,
const Common::Rect &rect);
84 void scheduleWaterEffect(uint16);
85 void clearWaterEffect();
88 void setFliesEffect(uint16 count,
bool fireflies);
89 void clearFliesEffect();
96 void runScheduledTransition();
98 void setTransitionMode(RivenTransitionMode mode);
99 static RivenTransitionMode sanitizeTransitionMode(
int mode);
107 void updateCredits();
108 uint getCurCreditsImage()
const {
return _creditsImage; }
117 int _screenUpdateNesting;
118 bool _screenUpdateRunning;
119 bool _enableCardUpdateScript;
126 RivenTransition _scheduledTransition;
128 RivenTransitionMode _transitionMode;
129 uint _transitionFrames;
130 uint _transitionDuration;
131 int16 _transitionOffset;
140 void clearMainScreen();
147 uint _creditsImage, _creditsPos;
170 uint32 _lastFrameTime;
188 struct FliesEffectEntry {
193 const uint16 *alphaMap;
196 int framesTillLightSwitch;
200 const uint16 *blurAlphaMap;
206 float directionAngleRad;
207 float directionAngleRadZ;
211 struct FliesEffectData {
213 bool unlightIfTooBright;
219 float blurSpeedTreshold;
223 int maxLightDuration;
228 uint _nextUpdateTime;
237 const FliesEffectData *_parameters;
238 static const FliesEffectData _firefliesParameters;
239 static const FliesEffectData _fliesParameters;
243 void initFlies(uint16 count);
244 void initFlyRandomPosition(uint index);
245 void initFlyAtPosition(uint index,
int posX,
int posY,
int posZ);
248 void updateFlyPosition(uint index);
253 void selectAlphaMap(
bool horGridOffset,
bool vertGridoffset,
const uint16 **alphaMap, uint *width, uint *height);
254 void colorBlending(uint32 flyColor, byte &r, byte &g, byte &b,
int alpha);
258 void restoreEffectsSurface();
260 int randomBetween(
int min,
int max);
Definition: graphics.h:40
Definition: riven_graphics.h:153
Definition: graphics.h:68
Definition: riven_graphics.h:61
Definition: riven_graphics.h:179
Definition: formatinfo.h:28