[Scummvm-cvs-logs] SF.net SVN: scummvm: [31781] scummvm/trunk/engines/made/scriptfuncs.cpp
john_doe at users.sourceforge.net
john_doe at users.sourceforge.net
Tue Apr 29 23:56:14 CEST 2008
Revision: 31781
http://scummvm.svn.sourceforge.net/scummvm/?rev=31781&view=rev
Author: john_doe
Date: 2008-04-29 14:56:13 -0700 (Tue, 29 Apr 2008)
Log Message:
-----------
Fixed bug in o1_READMENU where an incorrect string length was returned.
Also fixed o1_EVENT to return the correct event number when a key was pressed and removed the debug code there.
Modified Paths:
--------------
scummvm/trunk/engines/made/scriptfuncs.cpp
Modified: scummvm/trunk/engines/made/scriptfuncs.cpp
===================================================================
--- scummvm/trunk/engines/made/scriptfuncs.cpp 2008-04-29 21:52:26 UTC (rev 31780)
+++ scummvm/trunk/engines/made/scriptfuncs.cpp 2008-04-29 21:56:13 UTC (rev 31781)
@@ -218,25 +218,7 @@
case Common::EVENT_KEYDOWN:
_vm->_eventKey = event.kbd.ascii;
- switch (_vm->_eventKey) {
- case '1':
- eventNum = 1;
- break;
- case '2':
- eventNum = 2;
- break;
- case '3':
- eventNum = 3;
- break;
- case '4':
- eventNum = 4;
- break;
- case '5':
- eventNum = 5;
- break;
- default:
- break;
- }
+ eventNum = 5;
break;
case Common::EVENT_QUIT:
@@ -749,16 +731,18 @@
int16 objectIndex = argv[2];
int16 menuIndex = argv[1];
int16 textIndex = argv[0];
+ int16 length = 0;
MenuResource *menu = _vm->_res->getMenu(menuIndex);
if (menu) {
const char *text = menu->getString(textIndex);
- debug(4, "text = %s\n", text); fflush(stdout);
+ debug(4, "objectIndex = %04X; text = %s\n", objectIndex, text);
Object *obj = _vm->_dat->getObject(objectIndex);
obj->setString(text);
_vm->_res->freeResource(menu);
+ if (text)
+ length = strlen(text);
}
-
- return 0;
+ return length;
}
int16 ScriptFunctionsRtz::o1_DRAWMENU(int16 argc, int16 *argv) {
@@ -783,6 +767,11 @@
int16 ScriptFunctionsRtz::o1_GAMENAME(int16 argc, int16 *argv) {
warning("Unimplemented opcode: o1_GAMENAME");
+
+ warning("GAMENAME: 1) %d\n", argv[2]);
+ warning("GAMENAME: 2) %d\n", argv[1]);
+ warning("GAMENAME: 3) %d\n", argv[0]);
+
return 0;
}
@@ -803,6 +792,11 @@
}
int16 ScriptFunctionsRtz::o1_WHATSYNTH(int16 argc, int16 *argv) {
+ // 0 = Default
+ // 1 = PCSPKR
+ // 2 = SBFM/ADLIB
+ // 3 = ADLIBG
+ // 4 = MT32MPU
warning("Unimplemented opcode: o1_WHATSYNTH");
return 0;
}
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