diff options
-rw-r--r-- | engines/cine/gfx.cpp | 6 | ||||
-rw-r--r-- | engines/cine/script_fw.cpp | 17 |
2 files changed, 15 insertions, 8 deletions
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index cce8154d84..7a988227f6 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -1796,6 +1796,12 @@ void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 wi if(pMask) { spritePtr = pMask; } + + // ignore transparent color in 1bpp + if (bpp == 1) { + transparentColor = 1; + } + { for (int i = 0; i < height; i++) { byte *destPtr = page + x + y * 320; diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp index a34bf7ba2c..9cbe3c3fab 100644 --- a/engines/cine/script_fw.cpp +++ b/engines/cine/script_fw.cpp @@ -533,7 +533,6 @@ void RawScript::setData(const FWScriptInfo &info, const byte *data) { * @return Precalculated script labels */ const ScriptVars &RawScript::labels() const { - assert(_data); return _labels; } @@ -687,7 +686,7 @@ const char *FWScript::getNextString() { * @param pos Restored script position */ void FWScript::load(const ScriptVars &labels, const ScriptVars &local, uint16 compare, uint16 pos) { - assert(pos < _script._size); + assert(pos <= _script._size); _labels = labels; _localVars = local; _compare = compare; @@ -705,13 +704,15 @@ void FWScript::load(const ScriptVars &labels, const ScriptVars &local, uint16 co int FWScript::execute() { int ret = 0; - while (!ret) { - _line = _pos; - byte opcode = getNextByte(); - OpFunc handler = _info->opcodeHandler(opcode); + if(_script._size) { + while (!ret) { + _line = _pos; + byte opcode = getNextByte(); + OpFunc handler = _info->opcodeHandler(opcode); - if (handler) { - ret = (this->*handler)(); + if (handler) { + ret = (this->*handler)(); + } } } |