[Scummvm-cvs-logs] SF.net SVN: scummvm:[40944] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed May 27 19:13:42 CEST 2009
Revision: 40944
http://scummvm.svn.sourceforge.net/scummvm/?rev=40944&view=rev
Author: thebluegr
Date: 2009-05-27 17:13:42 +0000 (Wed, 27 May 2009)
Log Message:
-----------
Added a fix to get QFG3 working and changed an error to a warning to get EcoQuest 2 working
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
scummvm/trunk/engines/sci/vocabulary.cpp
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-05-27 16:45:42 UTC (rev 40943)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-05-27 17:13:42 UTC (rev 40944)
@@ -276,8 +276,8 @@
else if (color < s->gfx_state->gfxResMan->getColorCount())
return s->gfx_state->gfxResMan->getColor(color);
else {
- error("Color index %d out of bounds for pic %d (%d max)", color, s->gfx_state->pic_nr, s->gfx_state->gfxResMan->getColorCount());
- BREAKPOINT();
+ // Happens in the beginning of EcoQuest 2, when the dialog box of the customs officer shows up
+ warning("Color index %d out of bounds for pic %d (%d max)", color, s->gfx_state->pic_nr, s->gfx_state->gfxResMan->getColorCount());
return PaletteEntry(0,0,0);
}
}
Modified: scummvm/trunk/engines/sci/vocabulary.cpp
===================================================================
--- scummvm/trunk/engines/sci/vocabulary.cpp 2009-05-27 16:45:42 UTC (rev 40943)
+++ scummvm/trunk/engines/sci/vocabulary.cpp 2009-05-27 17:13:42 UTC (rev 40944)
@@ -141,7 +141,8 @@
int offset = READ_LE_UINT16(r->data + 2 + i * 2);
int len = READ_LE_UINT16(r->data + offset) - 2;
o[i].type = READ_LE_UINT16(r->data + offset + 2);
- o[i].name = Common::String((char *)r->data + offset + 4, len);
+ // QFG3 has empty opcodes
+ o[i].name = len > 0 ? Common::String((char *)r->data + offset + 4, len) : "Dummy";
#if 1 //def VOCABULARY_DEBUG
printf("Opcode %02X: %s, %d\n", i, o[i].name.c_str(), o[i].type);
#endif
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