diff options
author | Vicent Marti | 2008-06-14 14:44:29 +0000 |
---|---|---|
committer | Vicent Marti | 2008-06-14 14:44:29 +0000 |
commit | d0b27cf9c66b9281899acf826cb205e19dcb7260 (patch) | |
tree | 74e813b1d1f081f35f41ca7a95da5d048951b9e7 /engines/m4 | |
parent | d51a0cab3fe494698f001d81d5d86cea7cd0395b (diff) | |
parent | 91d3ea31359950b59ee46af8355cc0f5790257e5 (diff) | |
download | scummvm-rg350-d0b27cf9c66b9281899acf826cb205e19dcb7260.tar.gz scummvm-rg350-d0b27cf9c66b9281899acf826cb205e19dcb7260.tar.bz2 scummvm-rg350-d0b27cf9c66b9281899acf826cb205e19dcb7260.zip |
Merged trunk into the GUI branch.
Fixed MSVS9 project files.
svn-id: r32702
Diffstat (limited to 'engines/m4')
-rw-r--r-- | engines/m4/converse.cpp | 2 | ||||
-rw-r--r-- | engines/m4/converse.h | 2 | ||||
-rw-r--r-- | engines/m4/font.cpp | 2 | ||||
-rw-r--r-- | engines/m4/m4.cpp | 6 | ||||
-rw-r--r-- | engines/m4/script.h | 3 |
5 files changed, 9 insertions, 6 deletions
diff --git a/engines/m4/converse.cpp b/engines/m4/converse.cpp index 6480428661..729af6c40f 100644 --- a/engines/m4/converse.cpp +++ b/engines/m4/converse.cpp @@ -1110,7 +1110,7 @@ void Converse::setValue(int32 offset, int32 value) { _variables[hashOffset] = value; } -const int32 Converse::getValue(int32 offset) { +int32 Converse::getValue(int32 offset) { char hashOffset[10]; sprintf(hashOffset, "%i", offset); ConvVarHashMap::const_iterator entry = _variables.find(hashOffset); diff --git a/engines/m4/converse.h b/engines/m4/converse.h index bea90d9ddf..4bd4524029 100644 --- a/engines/m4/converse.h +++ b/engines/m4/converse.h @@ -171,7 +171,7 @@ public: ConvEntry *getNode(int32 index) { return _convNodes[index]; } void setValue(int32 offset, int32 value); - const int32 getValue(int32 offset); + int32 getValue(int32 offset); bool evaluateCondition(int32 leftVal, int32 op, int32 rightVal); bool performAction(EntryAction *action); /* diff --git a/engines/m4/font.cpp b/engines/m4/font.cpp index c9b9a44f23..119e7297cf 100644 --- a/engines/m4/font.cpp +++ b/engines/m4/font.cpp @@ -192,7 +192,7 @@ int32 Font::write(M4Surface *surface, const char *text, int x, int y, int width, while (*text) { - char theChar = (*text++) & 0x7F; + unsigned char theChar = (*text++) & 0x7F; int charWidth = _charWidths[theChar]; if (charWidth > 0) { diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp index 6707639d1c..b2c0eda1ce 100644 --- a/engines/m4/m4.cpp +++ b/engines/m4/m4.cpp @@ -396,10 +396,12 @@ int M4Engine::goM4() { // Show intro - if (getGameType() == GType_Burger) + if (getGameType() == GType_Burger) { _kernel->newRoom = TITLE_SCENE_BURGER; - else + } else { _scene->getBackgroundSurface()->loadBackgroundRiddle("main menu"); + _ws->setBackgroundSurface(_scene->getBackgroundSurface()); + } _viewManager->addView(_scene); diff --git a/engines/m4/script.h b/engines/m4/script.h index a59bf46e86..2a937040e9 100644 --- a/engines/m4/script.h +++ b/engines/m4/script.h @@ -300,7 +300,8 @@ public: const T& toData(const ScriptValue &value) { printf("ScriptInterpreter::toData() index = %d; type = %d; max = %d\n", value.value, _data[value.value]->type, _data.size()); assert((uint32)value.value < _data.size()); - return *(_dataCache->load<T>(_scriptFile, _data[value.value]->offset)); + T *result = _dataCache->load<T>(_scriptFile, _data[value.value]->offset); + return *result; } const char *getGlobalString(int index) const { |