SCI: kPicNotValid now uses GfxScreen directly and not SciGui/32
svn-id: r47889
This commit is contained in:
parent
00ac235331
commit
5f39e3b7b5
5 changed files with 21 additions and 22 deletions
|
@ -215,7 +215,7 @@ reg_t kMoveCursor(EngineState *s, int argc, reg_t *argv) {
|
|||
reg_t kPicNotValid(EngineState *s, int argc, reg_t *argv) {
|
||||
int16 newPicNotValid = (argc > 0) ? argv[0].toUint16() : -1;
|
||||
|
||||
return make_reg(0, s->_gui->picNotValid(newPicNotValid));
|
||||
return make_reg(0, s->_gfxScreen->kernelPicNotValid(newPicNotValid));
|
||||
}
|
||||
|
||||
Common::Rect kGraphCreateRect(int16 x, int16 y, int16 x1, int16 y1) {
|
||||
|
|
|
@ -296,25 +296,6 @@ void SciGui::graphAdjustPriority(int top, int bottom) {
|
|||
}
|
||||
}
|
||||
|
||||
int16 SciGui::picNotValid(int16 newPicNotValid) {
|
||||
int16 oldPicNotValid;
|
||||
|
||||
if (getSciVersion() >= SCI_VERSION_1_1) {
|
||||
oldPicNotValid = _screen->_picNotValidSci11;
|
||||
|
||||
if (newPicNotValid != -1)
|
||||
_screen->_picNotValidSci11 = newPicNotValid;
|
||||
} else {
|
||||
oldPicNotValid = _screen->_picNotValid;
|
||||
|
||||
if (newPicNotValid != -1)
|
||||
_screen->_picNotValid = newPicNotValid;
|
||||
}
|
||||
|
||||
return oldPicNotValid;
|
||||
}
|
||||
|
||||
|
||||
void SciGui::shakeScreen(uint16 shakeCount, uint16 directions) {
|
||||
while (shakeCount--) {
|
||||
if (directions & SCI_SHAKE_DIRECTION_VERTICAL)
|
||||
|
|
|
@ -79,8 +79,6 @@ public:
|
|||
virtual void graphRedrawBox(Common::Rect rect);
|
||||
virtual void graphAdjustPriority(int top, int bottom);
|
||||
|
||||
virtual int16 picNotValid(int16 newPicNotValid);
|
||||
|
||||
virtual void shakeScreen(uint16 shakeCount, uint16 directions);
|
||||
|
||||
virtual uint16 onControl(byte screenMask, Common::Rect rect);
|
||||
|
|
|
@ -526,4 +526,22 @@ void GfxScreen::scale2x(byte *src, byte *dst, int16 srcWidth, int16 srcHeight) {
|
|||
}
|
||||
}
|
||||
|
||||
int16 GfxScreen::kernelPicNotValid(int16 newPicNotValid) {
|
||||
int16 oldPicNotValid;
|
||||
|
||||
if (getSciVersion() >= SCI_VERSION_1_1) {
|
||||
oldPicNotValid = _picNotValidSci11;
|
||||
|
||||
if (newPicNotValid != -1)
|
||||
_picNotValidSci11 = newPicNotValid;
|
||||
} else {
|
||||
oldPicNotValid = _picNotValid;
|
||||
|
||||
if (newPicNotValid != -1)
|
||||
_picNotValid = newPicNotValid;
|
||||
}
|
||||
|
||||
return oldPicNotValid;
|
||||
}
|
||||
|
||||
} // End of namespace Sci
|
||||
|
|
|
@ -95,6 +95,8 @@ public:
|
|||
int _picNotValid; // possible values 0, 1 and 2
|
||||
int _picNotValidSci11; // another variable that is used by kPicNotValid in sci1.1
|
||||
|
||||
int16 kernelPicNotValid(int16 newPicNotValid);
|
||||
|
||||
private:
|
||||
uint16 _width;
|
||||
uint16 _height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue