[Scummvm-cvs-logs] SF.net SVN: scummvm:[46305] scummvm/trunk/engines/sci/gui
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Wed Dec 9 10:31:07 CET 2009
Revision: 46305
http://scummvm.svn.sourceforge.net/scummvm/?rev=46305&view=rev
Author: m_kiewitz
Date: 2009-12-09 09:31:07 +0000 (Wed, 09 Dec 2009)
Log Message:
-----------
SCI: implemented _picNotValidSci11 for new kPicNotValid behaviour in sci1.1 (fixes island of dr. brain first pic after copy protection not showing up)
Modified Paths:
--------------
scummvm/trunk/engines/sci/gui/gui.cpp
scummvm/trunk/engines/sci/gui/gui.h
scummvm/trunk/engines/sci/gui/gui_gfx.cpp
scummvm/trunk/engines/sci/gui/gui_screen.cpp
scummvm/trunk/engines/sci/gui/gui_screen.h
Modified: scummvm/trunk/engines/sci/gui/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui.cpp 2009-12-09 07:28:04 UTC (rev 46304)
+++ scummvm/trunk/engines/sci/gui/gui.cpp 2009-12-09 09:31:07 UTC (rev 46305)
@@ -366,6 +366,12 @@
_palette->setOnScreen();
}
+int SciGui::getControlPicNotValid() {
+ if (getSciVersion() >= SCI_VERSION_1_1)
+ return _screen->_picNotValidSci11;
+ return _screen->_picNotValid;
+}
+
void SciGui::drawControlButton(Common::Rect rect, reg_t obj, const char *text, int16 fontId, int16 style, bool hilite) {
if (!hilite) {
rect.grow(1);
@@ -378,7 +384,7 @@
rect.grow(1);
if (style & 8) // selected
_gfx->FrameRect(rect);
- if (_screen->_picNotValid == 0) {
+ if (!getControlPicNotValid()) {
rect.grow(1);
_gfx->BitsShow(rect);
}
@@ -398,7 +404,7 @@
_gfx->FrameRect(rect);
}
rect.grow(1);
- if (_screen->_picNotValid == 0)
+ if (!getControlPicNotValid())
_gfx->BitsShow(rect);
} else {
_gfx->InvertRect(rect);
@@ -422,7 +428,7 @@
_text->SetFont(oldFontId);
rect.grow(1);
}
- if (_screen->_picNotValid == 0)
+ if (!getControlPicNotValid())
_gfx->BitsShow(rect);
}
@@ -432,7 +438,7 @@
if (style & 0x20) {
_gfx->FrameRect(rect);
}
- if (_screen->_picNotValid == 0)
+ if (!getControlPicNotValid())
_gfx->BitsShow(rect);
} else {
_gfx->InvertRect(rect);
@@ -447,7 +453,7 @@
if (isAlias && (style & 8)) {
_gfx->FrameRect(rect);
}
- if (_screen->_picNotValid == 0)
+ if (!getControlPicNotValid())
_gfx->BitsShow(rect);
}
}
@@ -524,11 +530,20 @@
}
int16 SciGui::picNotValid(int16 newPicNotValid) {
- int16 oldPicNotValid = _screen->_picNotValid;
+ int16 oldPicNotValid;
- if (newPicNotValid != -1)
- _screen->_picNotValid = newPicNotValid;
+ 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;
}
Modified: scummvm/trunk/engines/sci/gui/gui.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui.h 2009-12-09 07:28:04 UTC (rev 46304)
+++ scummvm/trunk/engines/sci/gui/gui.h 2009-12-09 09:31:07 UTC (rev 46305)
@@ -165,6 +165,7 @@
virtual void initPriorityBands();
virtual void animateShowPic();
virtual void addToPicSetPicNotValid();
+ virtual int getControlPicNotValid();
SciGuiWindowMgr *_windowMgr;
SciGuiAnimate *_animate;
Modified: scummvm/trunk/engines/sci/gui/gui_gfx.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-12-09 07:28:04 UTC (rev 46304)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-12-09 09:31:07 UTC (rev 46305)
@@ -347,8 +347,13 @@
Common::Rect clipRectTranslated = clipRect;
OffsetRect(clipRectTranslated);
view->draw(rect, clipRect, clipRectTranslated, loopNo, celNo, priority, paletteNo, origHeight);
- if (!_screen->_picNotValid)
- BitsShow(rect);
+ if (getSciVersion() >= SCI_VERSION_1_1) {
+ if (!_screen->_picNotValidSci11)
+ BitsShow(rect);
+ } else {
+ if (!_screen->_picNotValid)
+ BitsShow(rect);
+ }
}
}
Modified: scummvm/trunk/engines/sci/gui/gui_screen.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_screen.cpp 2009-12-09 07:28:04 UTC (rev 46304)
+++ scummvm/trunk/engines/sci/gui/gui_screen.cpp 2009-12-09 09:31:07 UTC (rev 46305)
@@ -54,7 +54,8 @@
// Sets display screen to be actually displayed
_activeScreen = _displayScreen;
- _picNotValid = false;
+ _picNotValid = 0;
+ _picNotValidSci11 = 0;
_unditherState = true;
if (_resMan->isVGA()) {
Modified: scummvm/trunk/engines/sci/gui/gui_screen.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_screen.h 2009-12-09 07:28:04 UTC (rev 46304)
+++ scummvm/trunk/engines/sci/gui/gui_screen.h 2009-12-09 09:31:07 UTC (rev 46305)
@@ -91,6 +91,7 @@
uint _displayPixels;
int _picNotValid; // possible values 0, 1 and 2
+ int _picNotValidSci11; // another variable that is used by kPicNotValid in sci1.1
byte _colorWhite;
byte _colorDefaultVectorData;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list