[Scummvm-cvs-logs] SF.net SVN: scummvm:[48332] scummvm/trunk/engines/teenagent/inventory.cpp
megath at users.sourceforge.net
megath at users.sourceforge.net
Sat Mar 20 19:15:33 CET 2010
Revision: 48332
http://scummvm.svn.sourceforge.net/scummvm/?rev=48332&view=rev
Author: megath
Date: 2010-03-20 18:15:32 +0000 (Sat, 20 Mar 2010)
Log Message:
-----------
cleaned up inventory activation, enter toggles the inventory.
Modified Paths:
--------------
scummvm/trunk/engines/teenagent/inventory.cpp
Modified: scummvm/trunk/engines/teenagent/inventory.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/inventory.cpp 2010-03-20 18:02:43 UTC (rev 48331)
+++ scummvm/trunk/engines/teenagent/inventory.cpp 2010-03-20 18:15:32 UTC (rev 48332)
@@ -50,6 +50,7 @@
uint32 items_size = varia.getSize(4);
if (items_size == 0)
error("invalid inventory items size");
+ debug(0, "loading items, size: %u", items_size);
items = new byte[items_size];
varia.read(4, items, items_size);
@@ -153,19 +154,18 @@
switch (event.type) {
case Common::EVENT_MOUSEMOVE:
mouse = event.mouse;
- if (!active() && event.mouse.y < 5) {
- activate(true);
- return _active;
+
+ if (!_active) {
+ if (event.mouse.y < 5)
+ activate(true);
+ return false;
}
if (event.mouse.x < 17 || event.mouse.x >= 303 || event.mouse.y >= 153) {
activate(false);
- return _active;
+ return false;
}
- if (!_active)
- return false;
-
hovered_obj = NULL;
for (int i = 0; i < 24; ++i) {
@@ -252,6 +252,10 @@
activate(false);
return true;
}
+ if (event.kbd.keycode == Common::KEYCODE_RETURN) { //triangle button on psp
+ activate(!_active);
+ return true;
+ }
return false;
case Common::EVENT_LBUTTONUP:
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