aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2009-05-27 17:13:42 +0000
committerFilippos Karapetis2009-05-27 17:13:42 +0000
commit4717533deaee057c450a01a78614c29d41b0cdfe (patch)
tree868c8cdff20d48eac5e77135efe6afbd619997a9
parentc75bdbc8e95946e1388fa45b086f8f37566ce886 (diff)
downloadscummvm-rg350-4717533deaee057c450a01a78614c29d41b0cdfe.tar.gz
scummvm-rg350-4717533deaee057c450a01a78614c29d41b0cdfe.tar.bz2
scummvm-rg350-4717533deaee057c450a01a78614c29d41b0cdfe.zip
Added a fix to get QFG3 working and changed an error to a warning to get EcoQuest 2 working
svn-id: r40944
-rw-r--r--engines/sci/engine/kgraphics.cpp4
-rw-r--r--engines/sci/vocabulary.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 400a8f78ec..c4b017643e 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -276,8 +276,8 @@ PaletteEntry get_pic_color(EngineState *s, int color) {
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);
}
}
diff --git a/engines/sci/vocabulary.cpp b/engines/sci/vocabulary.cpp
index cfac4b0ebf..96b01b4c38 100644
--- a/engines/sci/vocabulary.cpp
+++ b/engines/sci/vocabulary.cpp
@@ -141,7 +141,8 @@ bool vocab_get_opcodes(ResourceManager *resmgr, Common::Array<opcode> &o) {
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