[Scummvm-cvs-logs] SF.net SVN: scummvm: [31081] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sun Mar 9 10:58:05 CET 2008
Revision: 31081
http://scummvm.svn.sourceforge.net/scummvm/?rev=31081&view=rev
Author: lordhoto
Date: 2008-03-09 01:58:05 -0800 (Sun, 09 Mar 2008)
Log Message:
-----------
Fixed access of inventory in HoF while cursor is not visible.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/gui_v2.cpp
scummvm/trunk/engines/kyra/screen.cpp
scummvm/trunk/engines/kyra/screen.h
Modified: scummvm/trunk/engines/kyra/gui_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_v2.cpp 2008-03-09 09:28:10 UTC (rev 31080)
+++ scummvm/trunk/engines/kyra/gui_v2.cpp 2008-03-09 09:58:05 UTC (rev 31081)
@@ -572,7 +572,9 @@
}
int KyraEngine_v2::buttonInventory(Button *button) {
- //XXX test if cursor is shown
+ if (!_screen->isMouseShown())
+ return 0;
+
int inventorySlot = button->index - 6;
uint16 item = _mainCharacter.inventory[inventorySlot];
Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp 2008-03-09 09:28:10 UTC (rev 31080)
+++ scummvm/trunk/engines/kyra/screen.cpp 2008-03-09 09:58:05 UTC (rev 31081)
@@ -2300,6 +2300,10 @@
_mouseLockCount--;
}
+bool Screen::isMouseShown() const {
+ return (_mouseLockCount == 0);
+}
+
void Screen::setShapePages(int page1, int page2) {
debugC(9, kDebugLevelScreen, "Screen::setShapePages(%d, %d)", page1, page2);
_shapePages[0] = _pagePtrs[page1];
Modified: scummvm/trunk/engines/kyra/screen.h
===================================================================
--- scummvm/trunk/engines/kyra/screen.h 2008-03-09 09:28:10 UTC (rev 31080)
+++ scummvm/trunk/engines/kyra/screen.h 2008-03-09 09:58:05 UTC (rev 31081)
@@ -182,6 +182,7 @@
void hideMouse();
void showMouse();
void setMouseCursor(int x, int y, byte *shape);
+ bool isMouseShown() const;
// rect handling
virtual int getRectSize(int w, int h);
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