SCI: renaming Transitions to GfxTransitions
svn-id: r47890
This commit is contained in:
parent
5f39e3b7b5
commit
c336204a3f
8 changed files with 47 additions and 47 deletions
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
namespace Sci {
|
namespace Sci {
|
||||||
|
|
||||||
GfxAnimate::GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, Cursor *cursor, Transitions *transitions)
|
GfxAnimate::GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, Cursor *cursor, GfxTransitions *transitions)
|
||||||
: _s(state), _cache(cache), _ports(ports), _paint16(paint16), _screen(screen), _palette(palette), _cursor(cursor), _transitions(transitions) {
|
: _s(state), _cache(cache), _ports(ports), _paint16(paint16), _screen(screen), _palette(palette), _cursor(cursor), _transitions(transitions) {
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,12 +77,12 @@ typedef Common::List<AnimateEntry *> AnimateList;
|
||||||
class GfxCache;
|
class GfxCache;
|
||||||
class GfxPorts;
|
class GfxPorts;
|
||||||
class GfxPaint16;
|
class GfxPaint16;
|
||||||
class Screen;
|
class GfxScreen;
|
||||||
class SciPalette;
|
class GfxPalette;
|
||||||
class Transitions;
|
class GfxTransitions;
|
||||||
class GfxAnimate {
|
class GfxAnimate {
|
||||||
public:
|
public:
|
||||||
GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, Cursor *cursor, Transitions *transitions);
|
GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, Cursor *cursor, GfxTransitions *transitions);
|
||||||
virtual ~GfxAnimate();
|
virtual ~GfxAnimate();
|
||||||
|
|
||||||
// FIXME: Don't store EngineState
|
// FIXME: Don't store EngineState
|
||||||
|
@ -119,7 +119,7 @@ private:
|
||||||
GfxScreen *_screen;
|
GfxScreen *_screen;
|
||||||
GfxPalette *_palette;
|
GfxPalette *_palette;
|
||||||
Cursor *_cursor;
|
Cursor *_cursor;
|
||||||
Transitions *_transitions;
|
GfxTransitions *_transitions;
|
||||||
|
|
||||||
uint16 _listCount;
|
uint16 _listCount;
|
||||||
AnimateEntry *_listData;
|
AnimateEntry *_listData;
|
||||||
|
|
|
@ -54,7 +54,7 @@ SciGui::SciGui(EngineState *state, GfxScreen *screen, GfxPalette *palette, GfxCa
|
||||||
: _s(state), _screen(screen), _palette(palette), _cache(cache), _cursor(cursor), _ports(ports), _audio(audio) {
|
: _s(state), _screen(screen), _palette(palette), _cache(cache), _cursor(cursor), _ports(ports), _audio(audio) {
|
||||||
|
|
||||||
_compare = new GfxCompare(_s->_segMan, _s->_kernel, _cache, _screen);
|
_compare = new GfxCompare(_s->_segMan, _s->_kernel, _cache, _screen);
|
||||||
_transitions = new Transitions(this, _screen, _palette, _s->resMan->isVGA());
|
_transitions = new GfxTransitions(this, _screen, _palette, _s->resMan->isVGA());
|
||||||
_paint16 = new GfxPaint16(_s->resMan, _s->_segMan, _s->_kernel, _cache, _ports, _screen, _palette, _transitions);
|
_paint16 = new GfxPaint16(_s->resMan, _s->_segMan, _s->_kernel, _cache, _ports, _screen, _palette, _transitions);
|
||||||
_s->_gfxPaint = _paint16;
|
_s->_gfxPaint = _paint16;
|
||||||
_s->_gfxPaint16 = _paint16;
|
_s->_gfxPaint16 = _paint16;
|
||||||
|
|
|
@ -41,7 +41,7 @@ enum {
|
||||||
SCI_CONTROLS_TYPE_DUMMY = 10
|
SCI_CONTROLS_TYPE_DUMMY = 10
|
||||||
};
|
};
|
||||||
|
|
||||||
class Screen;
|
class GfxScreen;
|
||||||
class GfxPalette;
|
class GfxPalette;
|
||||||
class Cursor;
|
class Cursor;
|
||||||
class GfxCache;
|
class GfxCache;
|
||||||
|
@ -52,7 +52,7 @@ class GfxAnimate;
|
||||||
class GfxControls;
|
class GfxControls;
|
||||||
class GfxMenu;
|
class GfxMenu;
|
||||||
class GfxText16;
|
class GfxText16;
|
||||||
class Transitions;
|
class GfxTransitions;
|
||||||
|
|
||||||
class SciGui {
|
class SciGui {
|
||||||
public:
|
public:
|
||||||
|
@ -132,7 +132,7 @@ private:
|
||||||
GfxControls *_controls;
|
GfxControls *_controls;
|
||||||
GfxMenu *_menu;
|
GfxMenu *_menu;
|
||||||
GfxText16 *_text16;
|
GfxText16 *_text16;
|
||||||
Transitions *_transitions;
|
GfxTransitions *_transitions;
|
||||||
int16 _palVaryId;
|
int16 _palVaryId;
|
||||||
uint32 _palVaryStart;
|
uint32 _palVaryStart;
|
||||||
uint32 _palVaryEnd;
|
uint32 _palVaryEnd;
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
namespace Sci {
|
namespace Sci {
|
||||||
|
|
||||||
GfxPaint16::GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxPorts *ports, GfxScreen *screen, GfxPalette *palette, Transitions *transitions)
|
GfxPaint16::GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxPorts *ports, GfxScreen *screen, GfxPalette *palette, GfxTransitions *transitions)
|
||||||
: _resMan(resMan), _segMan(segMan), _kernel(kernel), _cache(cache), _ports(ports), _screen(screen), _palette(palette), _transitions(transitions) {
|
: _resMan(resMan), _segMan(segMan), _kernel(kernel), _cache(cache), _ports(ports), _screen(screen), _palette(palette), _transitions(transitions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,15 +34,15 @@
|
||||||
namespace Sci {
|
namespace Sci {
|
||||||
|
|
||||||
class GfxPorts;
|
class GfxPorts;
|
||||||
class Screen;
|
class GfxScreen;
|
||||||
class SciPalette;
|
class GfxPalette;
|
||||||
class Font;
|
class Font;
|
||||||
class SciGuiPicture;
|
class SciGuiPicture;
|
||||||
class View;
|
class View;
|
||||||
|
|
||||||
class GfxPaint16 : public GfxPaint {
|
class GfxPaint16 : public GfxPaint {
|
||||||
public:
|
public:
|
||||||
GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxPorts *ports, GfxScreen *screen, GfxPalette *palette, Transitions *transitions);
|
GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxPorts *ports, GfxScreen *screen, GfxPalette *palette, GfxTransitions *transitions);
|
||||||
~GfxPaint16();
|
~GfxPaint16();
|
||||||
|
|
||||||
void init(GfxText16 *text16);
|
void init(GfxText16 *text16);
|
||||||
|
@ -91,7 +91,7 @@ private:
|
||||||
GfxScreen *_screen;
|
GfxScreen *_screen;
|
||||||
GfxPalette *_palette;
|
GfxPalette *_palette;
|
||||||
GfxText16 *_text16;
|
GfxText16 *_text16;
|
||||||
Transitions *_transitions;
|
GfxTransitions *_transitions;
|
||||||
|
|
||||||
// true means make EGA picture drawing visible
|
// true means make EGA picture drawing visible
|
||||||
bool _EGAdrawingVisualize;
|
bool _EGAdrawingVisualize;
|
||||||
|
|
|
@ -37,17 +37,17 @@
|
||||||
|
|
||||||
namespace Sci {
|
namespace Sci {
|
||||||
|
|
||||||
Transitions::Transitions(SciGui *gui, GfxScreen *screen, GfxPalette *palette, bool isVGA)
|
GfxTransitions::GfxTransitions(SciGui *gui, GfxScreen *screen, GfxPalette *palette, bool isVGA)
|
||||||
: _gui(gui), _screen(screen), _palette(palette), _isVGA(isVGA) {
|
: _gui(gui), _screen(screen), _palette(palette), _isVGA(isVGA) {
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
Transitions::~Transitions() {
|
GfxTransitions::~GfxTransitions() {
|
||||||
delete[] _oldScreen;
|
delete[] _oldScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This table contains a mapping between oldIDs (prior SCI1LATE) and newIDs
|
// This table contains a mapping between oldIDs (prior SCI1LATE) and newIDs
|
||||||
static const GuiTransitionTranslateEntry oldTransitionIDs[] = {
|
static const GfxTransitionTranslateEntry oldTransitionIDs[] = {
|
||||||
{ 0, SCI_TRANSITIONS_VERTICALROLL_FROMCENTER, false },
|
{ 0, SCI_TRANSITIONS_VERTICALROLL_FROMCENTER, false },
|
||||||
{ 1, SCI_TRANSITIONS_HORIZONTALROLL_FROMCENTER, false },
|
{ 1, SCI_TRANSITIONS_HORIZONTALROLL_FROMCENTER, false },
|
||||||
{ 2, SCI_TRANSITIONS_STRAIGHT_FROM_RIGHT, false },
|
{ 2, SCI_TRANSITIONS_STRAIGHT_FROM_RIGHT, false },
|
||||||
|
@ -78,7 +78,7 @@ static const GuiTransitionTranslateEntry oldTransitionIDs[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// this table defines the blackout-transition that needs to be done prior doing the actual transition
|
// this table defines the blackout-transition that needs to be done prior doing the actual transition
|
||||||
static const GuiTransitionTranslateEntry blackoutTransitionIDs[] = {
|
static const GfxTransitionTranslateEntry blackoutTransitionIDs[] = {
|
||||||
{ SCI_TRANSITIONS_VERTICALROLL_FROMCENTER, SCI_TRANSITIONS_VERTICALROLL_TOCENTER, true },
|
{ SCI_TRANSITIONS_VERTICALROLL_FROMCENTER, SCI_TRANSITIONS_VERTICALROLL_TOCENTER, true },
|
||||||
{ SCI_TRANSITIONS_HORIZONTALROLL_FROMCENTER, SCI_TRANSITIONS_HORIZONTALROLL_TOCENTER, true },
|
{ SCI_TRANSITIONS_HORIZONTALROLL_FROMCENTER, SCI_TRANSITIONS_HORIZONTALROLL_TOCENTER, true },
|
||||||
{ SCI_TRANSITIONS_STRAIGHT_FROM_RIGHT, SCI_TRANSITIONS_STRAIGHT_FROM_LEFT, true },
|
{ SCI_TRANSITIONS_STRAIGHT_FROM_RIGHT, SCI_TRANSITIONS_STRAIGHT_FROM_LEFT, true },
|
||||||
|
@ -101,7 +101,7 @@ static const GuiTransitionTranslateEntry blackoutTransitionIDs[] = {
|
||||||
{ 255, 255, true }
|
{ 255, 255, true }
|
||||||
};
|
};
|
||||||
|
|
||||||
void Transitions::init() {
|
void GfxTransitions::init() {
|
||||||
_oldScreen = new byte[_screen->getDisplayHeight() * _screen->getDisplayWidth()];
|
_oldScreen = new byte[_screen->getDisplayHeight() * _screen->getDisplayWidth()];
|
||||||
|
|
||||||
if (getSciVersion() >= SCI_VERSION_1_LATE)
|
if (getSciVersion() >= SCI_VERSION_1_LATE)
|
||||||
|
@ -114,14 +114,14 @@ void Transitions::init() {
|
||||||
_blackoutFlag = false;
|
_blackoutFlag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Transitions::setup(int16 number, bool blackoutFlag) {
|
void GfxTransitions::setup(int16 number, bool blackoutFlag) {
|
||||||
if (number != -1) {
|
if (number != -1) {
|
||||||
_number = number;
|
_number = number;
|
||||||
_blackoutFlag = blackoutFlag;
|
_blackoutFlag = blackoutFlag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Transitions::updateScreenAndWait(int msec) {
|
void GfxTransitions::updateScreenAndWait(int msec) {
|
||||||
Common::Event ev;
|
Common::Event ev;
|
||||||
g_system->updateScreen();
|
g_system->updateScreen();
|
||||||
g_system->delayMillis(msec);
|
g_system->delayMillis(msec);
|
||||||
|
@ -129,7 +129,7 @@ void Transitions::updateScreenAndWait(int msec) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// will translate a number and return corresponding translationEntry
|
// will translate a number and return corresponding translationEntry
|
||||||
const GuiTransitionTranslateEntry *Transitions::translateNumber (int16 number, const GuiTransitionTranslateEntry *tablePtr) {
|
const GfxTransitionTranslateEntry *GfxTransitions::translateNumber (int16 number, const GfxTransitionTranslateEntry *tablePtr) {
|
||||||
while (1) {
|
while (1) {
|
||||||
if (tablePtr->orgId == 255)
|
if (tablePtr->orgId == 255)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -139,8 +139,8 @@ const GuiTransitionTranslateEntry *Transitions::translateNumber (int16 number, c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Transitions::doit(Common::Rect picRect) {
|
void GfxTransitions::doit(Common::Rect picRect) {
|
||||||
const GuiTransitionTranslateEntry *translationEntry = _translationTable;
|
const GfxTransitionTranslateEntry *translationEntry = _translationTable;
|
||||||
|
|
||||||
_picRect = picRect;
|
_picRect = picRect;
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ void Transitions::doit(Common::Rect picRect) {
|
||||||
|
|
||||||
// This may get called twice, if blackoutFlag is set. It will get once called with blackoutFlag set and another time
|
// This may get called twice, if blackoutFlag is set. It will get once called with blackoutFlag set and another time
|
||||||
// with no blackoutFlag.
|
// with no blackoutFlag.
|
||||||
void Transitions::doTransition(int16 number, bool blackoutFlag) {
|
void GfxTransitions::doTransition(int16 number, bool blackoutFlag) {
|
||||||
if (number != SCI_TRANSITIONS_FADEPALETTE) {
|
if (number != SCI_TRANSITIONS_FADEPALETTE) {
|
||||||
setNewPalette(blackoutFlag);
|
setNewPalette(blackoutFlag);
|
||||||
}
|
}
|
||||||
|
@ -246,20 +246,20 @@ void Transitions::doTransition(int16 number, bool blackoutFlag) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Transitions::setNewPalette(bool blackoutFlag) {
|
void GfxTransitions::setNewPalette(bool blackoutFlag) {
|
||||||
if (!blackoutFlag)
|
if (!blackoutFlag)
|
||||||
if (_isVGA)
|
if (_isVGA)
|
||||||
_palette->setOnScreen();
|
_palette->setOnScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Transitions::setNewScreen(bool blackoutFlag) {
|
void GfxTransitions::setNewScreen(bool blackoutFlag) {
|
||||||
if (!blackoutFlag) {
|
if (!blackoutFlag) {
|
||||||
_screen->copyRectToScreen(_picRect);
|
_screen->copyRectToScreen(_picRect);
|
||||||
g_system->updateScreen();
|
g_system->updateScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Transitions::copyRectToScreen(const Common::Rect rect, bool blackoutFlag) {
|
void GfxTransitions::copyRectToScreen(const Common::Rect rect, bool blackoutFlag) {
|
||||||
if (!blackoutFlag) {
|
if (!blackoutFlag) {
|
||||||
_screen->copyRectToScreen(rect);
|
_screen->copyRectToScreen(rect);
|
||||||
} else {
|
} else {
|
||||||
|
@ -270,7 +270,7 @@ void Transitions::copyRectToScreen(const Common::Rect rect, bool blackoutFlag) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: dont do too many steps in here, otherwise cpu will crap out because of the load
|
// Note: dont do too many steps in here, otherwise cpu will crap out because of the load
|
||||||
void Transitions::fadeOut() {
|
void GfxTransitions::fadeOut() {
|
||||||
byte oldPalette[4 * 256], workPalette[4 * 256];
|
byte oldPalette[4 * 256], workPalette[4 * 256];
|
||||||
int16 stepNr, colorNr;
|
int16 stepNr, colorNr;
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ void Transitions::fadeOut() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: dont do too many steps in here, otherwise cpu will crap out because of the load
|
// Note: dont do too many steps in here, otherwise cpu will crap out because of the load
|
||||||
void Transitions::fadeIn() {
|
void GfxTransitions::fadeIn() {
|
||||||
int16 stepNr;
|
int16 stepNr;
|
||||||
|
|
||||||
for (stepNr = 0; stepNr <= 100; stepNr += 10) {
|
for (stepNr = 0; stepNr <= 100; stepNr += 10) {
|
||||||
|
@ -299,7 +299,7 @@ void Transitions::fadeIn() {
|
||||||
|
|
||||||
// pixelates the new picture over the old one - works against the whole screen
|
// pixelates the new picture over the old one - works against the whole screen
|
||||||
// TODO: it seems this needs to get applied on _picRect only if possible
|
// TODO: it seems this needs to get applied on _picRect only if possible
|
||||||
void Transitions::pixelation (bool blackoutFlag) {
|
void GfxTransitions::pixelation (bool blackoutFlag) {
|
||||||
uint16 mask = 0x40, stepNr = 0;
|
uint16 mask = 0x40, stepNr = 0;
|
||||||
Common::Rect pixelRect;
|
Common::Rect pixelRect;
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ void Transitions::pixelation (bool blackoutFlag) {
|
||||||
|
|
||||||
// like pixelation but uses 8x8 blocks - works against the whole screen
|
// like pixelation but uses 8x8 blocks - works against the whole screen
|
||||||
// TODO: it seems this needs to get applied on _picRect only if possible
|
// TODO: it seems this needs to get applied on _picRect only if possible
|
||||||
void Transitions::blocks(bool blackoutFlag) {
|
void GfxTransitions::blocks(bool blackoutFlag) {
|
||||||
uint16 mask = 0x40, stepNr = 0;
|
uint16 mask = 0x40, stepNr = 0;
|
||||||
Common::Rect blockRect;
|
Common::Rect blockRect;
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ void Transitions::blocks(bool blackoutFlag) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// directly shows new screen starting up/down/left/right and going to the opposite direction - works on _picRect area only
|
// directly shows new screen starting up/down/left/right and going to the opposite direction - works on _picRect area only
|
||||||
void Transitions::straight(int16 number, bool blackoutFlag) {
|
void GfxTransitions::straight(int16 number, bool blackoutFlag) {
|
||||||
int16 stepNr = 0;
|
int16 stepNr = 0;
|
||||||
Common::Rect newScreenRect = _picRect;
|
Common::Rect newScreenRect = _picRect;
|
||||||
|
|
||||||
|
@ -394,7 +394,7 @@ void Transitions::straight(int16 number, bool blackoutFlag) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// scroll old screen (up/down/left/right) and insert new screen that way - works on _picRect area only
|
// scroll old screen (up/down/left/right) and insert new screen that way - works on _picRect area only
|
||||||
void Transitions::scroll(int16 number) {
|
void GfxTransitions::scroll(int16 number) {
|
||||||
int16 screenWidth, screenHeight;
|
int16 screenWidth, screenHeight;
|
||||||
byte *oldScreenPtr;
|
byte *oldScreenPtr;
|
||||||
int16 stepNr = 0;
|
int16 stepNr = 0;
|
||||||
|
@ -471,7 +471,7 @@ void Transitions::scroll(int16 number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// vertically displays new screen starting from center - works on _picRect area only
|
// vertically displays new screen starting from center - works on _picRect area only
|
||||||
void Transitions::verticalRollFromCenter(bool blackoutFlag) {
|
void GfxTransitions::verticalRollFromCenter(bool blackoutFlag) {
|
||||||
Common::Rect leftRect = Common::Rect(_picRect.left + (_picRect.width() / 2) -1, _picRect.top, _picRect.left + (_picRect.width() / 2), _picRect.bottom);
|
Common::Rect leftRect = Common::Rect(_picRect.left + (_picRect.width() / 2) -1, _picRect.top, _picRect.left + (_picRect.width() / 2), _picRect.bottom);
|
||||||
Common::Rect rightRect = Common::Rect(leftRect.right, _picRect.top, leftRect.right + 1, _picRect.bottom);
|
Common::Rect rightRect = Common::Rect(leftRect.right, _picRect.top, leftRect.right + 1, _picRect.bottom);
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ void Transitions::verticalRollFromCenter(bool blackoutFlag) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// vertically displays new screen starting from edges - works on _picRect area only
|
// vertically displays new screen starting from edges - works on _picRect area only
|
||||||
void Transitions::verticalRollToCenter(bool blackoutFlag) {
|
void GfxTransitions::verticalRollToCenter(bool blackoutFlag) {
|
||||||
Common::Rect leftRect = Common::Rect(_picRect.left, _picRect.top, _picRect.left + 1, _picRect.bottom);
|
Common::Rect leftRect = Common::Rect(_picRect.left, _picRect.top, _picRect.left + 1, _picRect.bottom);
|
||||||
Common::Rect rightRect = Common::Rect(leftRect.right - 1, _picRect.top, leftRect.right, _picRect.bottom);
|
Common::Rect rightRect = Common::Rect(leftRect.right - 1, _picRect.top, leftRect.right, _picRect.bottom);
|
||||||
|
|
||||||
|
@ -499,7 +499,7 @@ void Transitions::verticalRollToCenter(bool blackoutFlag) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// horizontally displays new screen starting from center - works on _picRect area only
|
// horizontally displays new screen starting from center - works on _picRect area only
|
||||||
void Transitions::horizontalRollFromCenter(bool blackoutFlag) {
|
void GfxTransitions::horizontalRollFromCenter(bool blackoutFlag) {
|
||||||
Common::Rect upperRect = Common::Rect(_picRect.left, _picRect.top + (_picRect.height() / 2) - 1, _picRect.right, _picRect.top + (_picRect.height() / 2));
|
Common::Rect upperRect = Common::Rect(_picRect.left, _picRect.top + (_picRect.height() / 2) - 1, _picRect.right, _picRect.top + (_picRect.height() / 2));
|
||||||
Common::Rect lowerRect = Common::Rect(upperRect.left, upperRect.bottom, upperRect.right, upperRect.bottom + 1);
|
Common::Rect lowerRect = Common::Rect(upperRect.left, upperRect.bottom, upperRect.right, upperRect.bottom + 1);
|
||||||
|
|
||||||
|
@ -515,7 +515,7 @@ void Transitions::horizontalRollFromCenter(bool blackoutFlag) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// horizontally displays new screen starting from upper and lower edge - works on _picRect area only
|
// horizontally displays new screen starting from upper and lower edge - works on _picRect area only
|
||||||
void Transitions::horizontalRollToCenter(bool blackoutFlag) {
|
void GfxTransitions::horizontalRollToCenter(bool blackoutFlag) {
|
||||||
Common::Rect upperRect = Common::Rect(_picRect.left, _picRect.top, _picRect.right, _picRect.top + 1);
|
Common::Rect upperRect = Common::Rect(_picRect.left, _picRect.top, _picRect.right, _picRect.top + 1);
|
||||||
Common::Rect lowerRect = Common::Rect(upperRect.left, _picRect.bottom - 1, upperRect.right, _picRect.bottom);
|
Common::Rect lowerRect = Common::Rect(upperRect.left, _picRect.bottom - 1, upperRect.right, _picRect.bottom);
|
||||||
|
|
||||||
|
@ -528,7 +528,7 @@ void Transitions::horizontalRollToCenter(bool blackoutFlag) {
|
||||||
|
|
||||||
// diagonally displays new screen starting from center - works on _picRect area only
|
// diagonally displays new screen starting from center - works on _picRect area only
|
||||||
// assumes that height of rect is larger than width
|
// assumes that height of rect is larger than width
|
||||||
void Transitions::diagonalRollFromCenter(bool blackoutFlag) {
|
void GfxTransitions::diagonalRollFromCenter(bool blackoutFlag) {
|
||||||
int16 halfHeight = _picRect.height() / 2;
|
int16 halfHeight = _picRect.height() / 2;
|
||||||
Common::Rect upperRect(_picRect.left + halfHeight - 2, _picRect.top + halfHeight, _picRect.right - halfHeight + 1, _picRect.top + halfHeight + 1);
|
Common::Rect upperRect(_picRect.left + halfHeight - 2, _picRect.top + halfHeight, _picRect.right - halfHeight + 1, _picRect.top + halfHeight + 1);
|
||||||
Common::Rect lowerRect(upperRect.left, upperRect.top, upperRect.right, upperRect.bottom);
|
Common::Rect lowerRect(upperRect.left, upperRect.top, upperRect.right, upperRect.bottom);
|
||||||
|
@ -558,7 +558,7 @@ void Transitions::diagonalRollFromCenter(bool blackoutFlag) {
|
||||||
|
|
||||||
// diagonally displays new screen starting from edges - works on _picRect area only
|
// diagonally displays new screen starting from edges - works on _picRect area only
|
||||||
// assumes that height of rect is larger than width
|
// assumes that height of rect is larger than width
|
||||||
void Transitions::diagonalRollToCenter(bool blackoutFlag) {
|
void GfxTransitions::diagonalRollToCenter(bool blackoutFlag) {
|
||||||
Common::Rect upperRect(_picRect.left, _picRect.top, _picRect.right, _picRect.top + 1);
|
Common::Rect upperRect(_picRect.left, _picRect.top, _picRect.right, _picRect.top + 1);
|
||||||
Common::Rect lowerRect(_picRect.left, _picRect.bottom - 1, _picRect.right, _picRect.bottom);
|
Common::Rect lowerRect(_picRect.left, _picRect.bottom - 1, _picRect.right, _picRect.bottom);
|
||||||
Common::Rect leftRect(_picRect.left, _picRect.top, _picRect.left + 1, _picRect.bottom);
|
Common::Rect leftRect(_picRect.left, _picRect.top, _picRect.left + 1, _picRect.bottom);
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
namespace Sci {
|
namespace Sci {
|
||||||
|
|
||||||
struct GuiTransitionTranslateEntry {
|
struct GfxTransitionTranslateEntry {
|
||||||
int16 orgId;
|
int16 orgId;
|
||||||
int16 newId;
|
int16 newId;
|
||||||
bool blackoutFlag;
|
bool blackoutFlag;
|
||||||
|
@ -60,17 +60,17 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
class Screen;
|
class Screen;
|
||||||
class Transitions {
|
class GfxTransitions {
|
||||||
public:
|
public:
|
||||||
Transitions(SciGui *gui, GfxScreen *screen, GfxPalette *palette, bool isVGA);
|
GfxTransitions(SciGui *gui, GfxScreen *screen, GfxPalette *palette, bool isVGA);
|
||||||
~Transitions();
|
~GfxTransitions();
|
||||||
|
|
||||||
void setup(int16 number, bool blackoutFlag);
|
void setup(int16 number, bool blackoutFlag);
|
||||||
void doit(Common::Rect picRect);
|
void doit(Common::Rect picRect);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init();
|
void init();
|
||||||
const GuiTransitionTranslateEntry *translateNumber(int16 number, const GuiTransitionTranslateEntry *tablePtr);
|
const GfxTransitionTranslateEntry *translateNumber(int16 number, const GfxTransitionTranslateEntry *tablePtr);
|
||||||
void doTransition(int16 number, bool blackout);
|
void doTransition(int16 number, bool blackout);
|
||||||
void setNewPalette(bool blackoutFlag);
|
void setNewPalette(bool blackoutFlag);
|
||||||
void setNewScreen(bool blackoutFlag);
|
void setNewScreen(bool blackoutFlag);
|
||||||
|
@ -94,7 +94,7 @@ private:
|
||||||
GfxPalette *_palette;
|
GfxPalette *_palette;
|
||||||
|
|
||||||
bool _isVGA;
|
bool _isVGA;
|
||||||
const GuiTransitionTranslateEntry *_translationTable;
|
const GfxTransitionTranslateEntry *_translationTable;
|
||||||
int16 _number;
|
int16 _number;
|
||||||
bool _blackoutFlag;
|
bool _blackoutFlag;
|
||||||
Common::Rect _picRect;
|
Common::Rect _picRect;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue