ScummVM API documentation
transitions32.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 SCI_GRAPHICS_TRANSITIONS32_H
23#define SCI_GRAPHICS_TRANSITIONS32_H
24
25#include "common/list.h"
26#include "common/scummsys.h"
27#include "sci/engine/vm_types.h"
28
29namespace Sci {
30enum ShowStyleType {
31 kShowStyleNone = 0,
32 kShowStyleHShutterOut = 1,
33 kShowStyleHShutterIn = 2,
34 kShowStyleVShutterOut = 3,
35 kShowStyleVShutterIn = 4,
36 kShowStyleWipeLeft = 5,
37 kShowStyleWipeRight = 6,
38 kShowStyleWipeUp = 7,
39 kShowStyleWipeDown = 8,
40 kShowStyleIrisOut = 9,
41 kShowStyleIrisIn = 10,
42 kShowStyleDissolveNoMorph = 11,
43 kShowStyleDissolve = 12,
44 kShowStyleFadeOut = 13,
45 kShowStyleFadeIn = 14,
46 kShowStyleMorph = 15
47};
48
58
62 ShowStyleType type;
63
68 bool fadeUp;
69
73 int16 divisions;
74
79 int16 color;
80
84 int delay;
85
91 bool animate;
92
96 uint32 nextTick;
97
102
107
108 //
109 // Engine specific properties for SCI2.1early
110 //
111
117
122 uint8 numEdges;
123
127 int16 width, height;
128
134
139
144
149
154 uint32 pixel;
155
156 //
157 // Engine specific properties for SCI2.1mid through SCI3
158 //
159
165};
166
176
180 int16 x, y;
181
186 int16 deltaX, deltaY;
187
191 GuiResourceId newPictureId;
192
197 GuiResourceId oldPictureId;
198
205
209 uint32 startTick;
210};
211
214
216public:
219
220private:
221 SegManager *_segMan;
222
237 void throttle(const uint32 ms = 10);
238
239 void clearShowRects();
240 void addShowRect(const Common::Rect &rect);
241 void sendShowRects();
242
243#pragma mark -
244#pragma mark Show styles
245public:
246 inline bool hasShowStyles() const { return !_showStyles.empty(); }
247
252
258
259 void kernelSetShowStyle(const reg_t planeObj, const ShowStyleType type, const int16 seconds,
260 const int16 direction, const int16 priority, const int16 animate, const int16 frameOutNow,
261 const reg_t pFadeArray, const int16 divisions, const int16 blackScreen);
262
267 void kernelSetPalStyleRange(const uint8 fromColor, const uint8 toColor);
268
272 int8 _styleRanges[256];
273
274private:
278 int *_dissolveSequenceSeeds;
279
284 int16 *_defaultDivisions;
285
289 ShowStyleList _showStyles;
290
294 PlaneShowStyle *findShowStyleForPlane(const reg_t planeObj);
295
299 ShowStyleList::iterator findIteratorForPlane(const reg_t planeObj);
300
305 ShowStyleList::iterator deleteShowStyle(const ShowStyleList::iterator &showStyle);
306
311 void configure21EarlyHorizontalWipe(PlaneShowStyle &showStyle, const int16 priority);
312
317 void configure21EarlyHorizontalShutter(PlaneShowStyle &showStyle, const int16 priority);
318
323 void configure21EarlyIris(PlaneShowStyle &showStyle, const int16 priority);
324
329 void configure21EarlyDissolve(PlaneShowStyle &showStyle, const int16 priority, const Common::Rect &gameRect);
330
334 bool processShowStyle(PlaneShowStyle &showStyle, uint32 now);
335
339 bool processNone(PlaneShowStyle &showStyle);
340
345 bool processHShutterOut(PlaneShowStyle &showStyle);
346
351 void processHShutterIn(const PlaneShowStyle &showStyle);
352
357 void processVShutterOut(PlaneShowStyle &showStyle);
358
363 void processVShutterIn(PlaneShowStyle &showStyle);
364
368 void processWipeLeft(PlaneShowStyle &showStyle);
369
373 void processWipeRight(PlaneShowStyle &showStyle);
374
378 void processWipeUp(PlaneShowStyle &showStyle);
379
383 void processWipeDown(PlaneShowStyle &showStyle);
384
388 bool processIrisOut(PlaneShowStyle &showStyle);
389
393 bool processIrisIn(PlaneShowStyle &showStyle);
394
395#if 0
400 void processDissolveNoMorph(PlaneShowStyle &showStyle);
401#endif
402
407 bool processPixelDissolve(PlaneShowStyle &showStyle);
408
412 bool processPixelDissolve21Early(PlaneShowStyle &showStyle);
413
417 bool processPixelDissolve21Mid(const PlaneShowStyle &showStyle);
418
422 bool processFade(const int8 direction, PlaneShowStyle &showStyle);
423
428 bool processMorph(PlaneShowStyle &showStyle);
429
433 bool processWipe(const int8 direction, PlaneShowStyle &showStyle);
434
435#pragma mark -
436#pragma mark Scrolls
437public:
438 inline bool hasScrolls() const { return !_scrolls.empty(); }
439
444
445 void kernelSetScroll(const reg_t plane, const int16 deltaX, const int16 deltaY, const GuiResourceId pictureId, const bool animate, const bool mirrorX);
446
447private:
451 ScrollList _scrolls;
452
456 bool processScroll(PlaneScroll &scroll);
457};
458
459} // End of namespace Sci
460
461#endif // SCI_GRAPHICS_TRANSITIONS32_H
bool empty() const
Definition: list.h:258
Definition: transitions32.h:215
void processEffects(PlaneShowStyle &showStyle)
int8 _styleRanges[256]
Definition: transitions32.h:272
void kernelSetPalStyleRange(const uint8 fromColor, const uint8 toColor)
Definition: screen_item32.h:53
Definition: seg_manager.h:48
Definition: console.h:28
Definition: list_intern.h:54
Definition: rect.h:536
Definition: transitions32.h:171
GuiResourceId oldPictureId
Definition: transitions32.h:197
int16 deltaX
Definition: transitions32.h:186
reg_t plane
Definition: transitions32.h:175
uint32 startTick
Definition: transitions32.h:209
bool animate
Definition: transitions32.h:204
int16 x
Definition: transitions32.h:180
GuiResourceId newPictureId
Definition: transitions32.h:191
Definition: transitions32.h:53
uint8 numEdges
Definition: transitions32.h:122
uint32 firstPixel
Definition: transitions32.h:148
bool processed
Definition: transitions32.h:106
ShowStyleType type
Definition: transitions32.h:62
Common::Array< ScreenItem * > screenItems
Definition: transitions32.h:116
bool animate
Definition: transitions32.h:91
ScreenItem * bitmapScreenItem
Definition: transitions32.h:133
int16 color
Definition: transitions32.h:79
uint32 pixel
Definition: transitions32.h:154
int16 width
Definition: transitions32.h:127
int currentStep
Definition: transitions32.h:101
uint32 nextTick
Definition: transitions32.h:96
reg_t plane
Definition: transitions32.h:57
uint32 dissolveMask
Definition: transitions32.h:143
reg_t bitmap
Definition: transitions32.h:138
bool fadeUp
Definition: transitions32.h:68
int16 divisions
Definition: transitions32.h:73
int delay
Definition: transitions32.h:84
Common::Array< uint16 > fadeColorRanges
Definition: transitions32.h:164
Definition: vm_types.h:39