[Scummvm-cvs-logs] SF.net SVN: scummvm:[50047] scummvm/trunk/engines/sci/event.cpp
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Sat Jun 19 12:57:01 CEST 2010
Revision: 50047
http://scummvm.svn.sourceforge.net/scummvm/?rev=50047&view=rev
Author: m_kiewitz
Date: 2010-06-19 10:57:01 +0000 (Sat, 19 Jun 2010)
Log Message:
-----------
SCI: replacing the keyboard size check for direction type detection with checking for script 933 (pseudoMouse) instead - this is better because its working multiplatform
Modified Paths:
--------------
scummvm/trunk/engines/sci/event.cpp
Modified: scummvm/trunk/engines/sci/event.cpp
===================================================================
--- scummvm/trunk/engines/sci/event.cpp 2010-06-19 10:28:41 UTC (rev 50046)
+++ scummvm/trunk/engines/sci/event.cpp 2010-06-19 10:57:01 UTC (rev 50047)
@@ -42,31 +42,15 @@
} else if (getSciVersion() <= SCI_VERSION_01) {
_usesNewKeyboardDirectionType = false;
} else {
- // TODO: maybe this is even not needed at all and we can just use the old method for sci1early
- // sq4 floppy doesn't have issues when using the old method although the keyboard driver is new
- // they changed this somewhere inbetween SCI1EGA/EARLY, so we need to check the size of the keyboard driver
+ // they changed this somewhere inbetween SCI1EGA/EARLY
_usesNewKeyboardDirectionType = false;
- Common::File keyboardDriver;
- if (keyboardDriver.open("IBMKBD.DRV")) {
- switch (keyboardDriver.size()) {
- case 442: // SCI0 (PQ2)
- case 446: // SCI0 (SQ3)
- case 449: // SCI1EGA (QfG2)
- break;
- case 537: // SCI1 (SQ4)
- case 564: // SCI1.1 (LB2)
- case 758: // SCI1.1 (LB2cd)
- case 760: // SCI1.1 (Pepper)
- _usesNewKeyboardDirectionType = true;
- break;
- default:
- error("Unsupported IBMKBD.DRV size (%d)", keyboardDriver.size());
- }
- } else {
- // We just default to OFF here in case the keyboard driver could not be found
- warning("IBMKBD.DRV not found to distinguish usage of direction type");
- }
+ // We are looking if script 933 exists, that one has the PseudoMouse class in it that handles it
+ // The good thing is that PseudoMouse seems to only exists in games that use the new method
+ if (g_sci->getResMan()->testResource(ResourceId(kResourceTypeScript, 933)))
+ _usesNewKeyboardDirectionType = true;
+ // Checking the keyboard driver size in here would also be a valid method, but the driver is only available
+ // in PC versions of the game
}
}
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